js盒模型
js盒模型属性
client
width/height/top/left
clientWidth padding+width
clientLeft 左边框宽度
offset
offsetWidth padding+width+border
offsetParent
scroll
scrollWidth 左border+内容真实宽
scrollHeight 上border+内容真实高
js盒模型
js盒模型属性
client
width/height/top/left
clientWidth padding+width
clientLeft 左边框宽度
offset
offsetWidth padding+width+border
offsetParent
scroll
scrollWidth 左border+内容真实宽
scrollHeight 上border+内容真实高
转载于:https://www.cnblogs.com/lxystar/p/10214288.html