图示offsetWidth、clientWidth、scrollWidth、scrollTop、scrollLeft等属性
2010-07-27 15:55
1596 查看
注释1:上图整个大背景是这个网页的全部尺寸,中间的小框才是浏览器中的可见尺寸。这幅图就是针对为文档(document)的各个height、width、top、left所做的说明。
注释2:第二幅图主要是针对网页中一个div的各个属性值所做的说明。“DIV element client area”是这个div元素的可见区域,“scroll area”是这个div内容原始尺寸,但是由于div的css所设置的高度宽度容不下它的内容,所以出现滚动条。
下面还有张更混乱的,在网上流传比较广:
相关文章推荐
- offsetTop、offsetLeft、offsetWidth、offsetHeight,scrollTop、scrollLeft、scrollWidth、scrollHeight ,clientHeight、offsetHeight
- 深刻了解offsetTop,offsetLeft,offsetWidth,offsetHeight,scrollTop,scrollLeft,scrollWidth,scrollHeight,clientHeight,clientWidth
- JS:clientWidth、scrollWidth、offsetWidth、clientTop、scrollTop、offsetTop、offsetParent
- js控制的DIV一些属性 scrollLeft,scrollWidth,clientWidth,offsetWidth .
- offsetWidth、clientWidth、scrollWidth、scrollTop
- offsetTop、clientTop、offsetWidth、clientWidth、scrollWidth、scrollTop、scrollLeft区别
- offsetTop.offsetLeft,offsetWidth,offsetHeight,offsetParent,scrollTop,scrollLeft,scrollWidth,scrollHeight区别
- js中常用元素属性scrollLeft,scrollWidth,clientWidth,offsetWidth的解释
- JS属性 ClientTop,scrollTop,offsetWidth,ClientWidth,clientLeft,padding,border,top,margin区别
- JS中offsetTop、clientTop、scrollTop、offsetTop各属性介绍
- js:scrollLeft,scrollWidth,clientWidth,offsetWidth完全详解
- DIV的scrollLeft,scrollWidth,clientWidth,offsetWidth
- HTML:scrollLeft,scrollWidth,clientWidth,offsetWidth到底指的哪到哪的距离之完全详解
- scrollLeft,scrollWidth,clientWidth,offsetWidth之完全详解
- HTML精确定位:scrollLeft,scrollWidth,clientWidth,offsetWidth之完全详解 .
- Web前端之 offsetWidth,clientWidth,scrollWidth,offsetLeft,clientLeft,scrollLeft
- document.body.clientWidth、scrollWidth、scrollTop;
- ffsetTop、clientTop、scrollTop、offsetTop各属性介绍
- client/scroll/offset width/height/top/left ---记第一篇博客
- scrollHeight,scrollLeft,scrollTop,scrollWidth,offsetHeight,offsetLeft,offsetTop,event.clientX,event.clientY