这几节的距离指什么???

clientWidth、clientHeight、scrollWidth、scrollHeight、offsetHeight

offsetWidth、scrollLeft、scrollTop、offsetLeft、offsetTop,网上说的很笼统,谁能帮忙用图例说明下这些指网页的哪些尺寸。谢谢!


qq_风华青春_03784766
浏览 1212回答 1
1回答

韩棠

clientWidth:浏览器窗口的内部宽度 不包含浏览器的视口,不包括工具栏和滚动条对于 Internet Explorer 8、7、6、5:document.documentElement.clientHeight 或者 document.body.clientWidth相当于Internet Explorer、Chrome、Firefox、Opera 以及 Safari的window.innerWidthclientHeight是高度scrollWidth 获取对象的滚动宽度scrollHeight: 获取对象的滚动高度。offsetHeight = 内容可视区域的高度+ 滚动条 + 边框。
打开App,查看更多内容
随时随地看视频慕课网APP

相关分类

JavaScript