您的位置:首页 > 其它

2016.07.09 offsetWidth 和一个问题。

2016-07-09 16:54 281 查看
原文链接:http://www.cnblogs.com/Tachi/p/5656152.html

  

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

offsetwidth:是元素相对父元素的偏移宽度。等于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

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: