offset scroll

mac2022-06-30  57

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

获取方法:

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

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

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

 

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

转载于:https://www.cnblogs.com/nice2018/p/9969831.html

最新回复(0)