美文网首页
clientheight、offsetheight、scroll

clientheight、offsetheight、scroll

作者: WangYatao | 来源:发表于2016-12-16 16:18 被阅读19次

演示地址
http://www.atynote.com/webstudy/%E5%AE%BD%E9%AB%98%E8%8E%B7%E5%8F%96.html
clientheight=可以看见的内容区域高度+可视内边距高度
offsetheight=可以看见的内容区域高度+可视内边距的上下高度+可视border的上下高度边距
scrollheight=实际的内容高度+可视内边距的上下高度
同样获取clientwidth、offsetwidth、scrollwidth、是同样的道理

Paste_Image.png
代码如下
Paste_Image.png

相关文章

网友评论

      本文标题:clientheight、offsetheight、scroll

      本文链接:https://www.haomeiwen.com/subject/elwnmttx.html