网站介绍:文章浏览阅读92次。1. 相关尺寸1.1 获取元素相对于文档的偏移量var pos = $('#small').offset(); console.log(pos.left, pos.top);1.2 获取当前元素相对于父级元素的偏移量var l = $('#small').position().left;var t = $('#small').position().top;console.l...
- 链接地址:https://blog.csdn.net/weixin_30448685/article/details/101859670
- 链接标题:[Web 前端] 027 jQuery 相关尺寸与事件绑定-CSDN博客
- 所属网站:blog.csdn.net
- 被收藏次数:6068
- 网站标签:[Web 前端] 027 jQuery 相关尺寸与事件绑定