开发者

How to find coordinates of an element relative to browser window

开发者 https://www.devze.com 2023-04-06 11:21 出处:网络
I want coordinates of an element relative to the browser window. So if an element开发者_运维百科 is at top-left corner of browser can I get it\'s coordinates as x=0, y=0. How to achieve this ?I think

I want coordinates of an element relative to the browser window. So if an element开发者_运维百科 is at top-left corner of browser can I get it's coordinates as x=0, y=0. How to achieve this ?


I think you could use this script or use jquery offset()

0

精彩评论

暂无评论...
验证码 换一张
取 消