2016.07.09 offsetWidth 和一个问题。

  

javascript 中 offsetWidth 是对象的可见宽度,包滚动条等边线,会随窗口的显示大小改变

clientWidth、offsetWidth、clientHeight区别
IE6.0、FF1.06+:
offsetWidth = width + padding + border
offsetHeight = height + padding + border
IE5.0/5.5:
offsetWidth = width
offsetHeight = height

offset是元素相对父元素的偏移宽度。等于border+padding+width

这个:

http://www.zhangxinxu.com/wordpress/2012/05/getcomputedstyle-js-getpropertyvalue-currentstyle/

http://blog.sina.com.cn/s/blog_5d64f7e301017kh0.html

原文地址:https://www.cnblogs.com/Tachi/p/5656152.html