首页
学习
活动
专区
工具
TVP
发布
精选内容/技术社群/优惠产品,尽在小程序
立即前往

height、offsetheight、clientheight、scrollheight、innerheight、outerheight

height、offsetheight、clientheight、scrollheight、innerheight、outerheight 平时,不管在pc端页面还是移动端页面,因为我们一般很少会设置某个块的的高度...下面都以高度来说,详细的区别在取某块或某元素高度的时候,这些height、offsetheight、clientheight、scrollheight、innerheight、outerheight的不同的地方...scrollHeight返回整个元素的高度(包括带滚动条的隐蔽的地方),它带着滚动条呢,但是一般会用到滚动条的地步么,好吧,我没用到过,也许我写的代码还不够多,结果显示上图h4; 四、关于innerheight和outerheight...outerheight顾名思义,outer了都,外面的都要了,获取元素集合中第一个元素的当前计算高度值,包括padding,border和选择性的margin。...在.outerHeight()计算中总是包含padding-top ,padding-bottom 和 border-top,border-bottom ;如果includeMargin参数是true,

1.3K20
您找到你想要的搜索结果了吗?
是的
没有找到
领券