码迷,mamicode.com
首页 > 其他好文 > 详细

offset scroll

时间:2018-11-16 17:26:57      阅读:164      评论:0      收藏:0      [点我收藏+]

标签:宽度   idt   top   获取   ber   off   span   scroll   网页   

offset  是到网页最左上角 0.0 的边距

获取方法:

$(".a1").offset() 获取的是对象 

$(".a3").offset().top 获取 top值 Number

$(".a3").offset().left

 

$(".a4")[0].offsetWidth 获取元素的宽度

offset scroll

标签:宽度   idt   top   获取   ber   off   span   scroll   网页   

原文地址:https://www.cnblogs.com/nice2018/p/9969831.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!