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

scrollHeight、offsetHeight、clientHeight与height的区别与联系

时间:2018-07-04 11:34:07      阅读:130      评论:0      收藏:0      [点我收藏+]

标签:http   设置   height   tps   blog   火狐   offset   article   .com   

参考:https://www.cnblogs.com/yuteng/articles/1894578.html

clientHeight与height的区别是如果有滚动条时应减去滚动条的17px不可用部分,
offsetHeight与Height的区别是增加了boder的高度,
ScrollHeihgt与Height的区别是火狐下与offsetHeight一致,
IE下所包含的对象的高度加上boder的高度和marging,如果它里面没有包含对象或者这个对象的高度值未设置,那么它的值将为15

scrollHeight、offsetHeight、clientHeight与height的区别与联系

标签:http   设置   height   tps   blog   火狐   offset   article   .com   

原文地址:https://www.cnblogs.com/maooyt/p/9262162.html

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