关于scrollWidth,clientWidth,offsetWidth
scrollWidth:对象的实际内容的宽度,不包含边线(border)的宽度,会随对象的内容可视区后而变大。
scrollHeight:对象的实际内容的高度,不包含边线(border)的宽度,会随对象的内容可视区后而变大。
scrollTop:设置或获取位于对象最顶端和窗口中可见内容的最顶端之间的距离。(可以理解对象吃掉的那块内容距离)
scrollLeft:设置或获取位于对象左边界和窗口中目前可见内容的最左端之间的距离。
clientWidth:对象的可视区(看的见)的宽度,不包含边线,及滚动条边线等宽度,会随对象的显示大小变化而变化。
offsetWidth:对象的整体实际宽度,包含边线,及滚动条边线等宽度,会随对象的显示大小变化而变化。
offsetHeight:对象的整体实际高度,包含边线,及滚动条边线等宽度,会随对象的显示大小变化而变化。
offsetTop:对象相对于版面或由 offsetParent 属性指定的父坐标的计算上侧位置。
offsetLeft:对象相对于版面或由 offsetParent 属性指定的父坐标的计算左侧位置。
关于scrollWidth,clientWidth,offsetWidth的更多相关文章
- HTML精确定位:scrollLeft,scrollWidth,clientWidth,offsetWidth
HTML精确定位:scrollLeft,scrollWidth,clientWidth,offsetWidth scrollHeight: 获取对象的滚动高度. scrollLeft:设置或获取位于对 ...
- HTML精确定位:scrollLeft,scrollWidth,clientWidth,offsetWidth之完全详解
HTML:scrollLeft,scrollWidth,clientWidth,offsetWidth到底指的哪到哪的距离之完全详解 scrollHeight: 获取对象的滚动高度. scrollLe ...
- scrollLeft,scrollWidth,clientWidth,offsetWidth 可实现导航栏固定不动(冻结)的效果
HTML精确定位:scrollLeft,scrollWidth,clientWidth,offsetWidth scrollHeight: 获取对象的滚动高度. scrollLeft:设置或获取位 ...
- HTML精确定位:scrollLeft,scrollWidth,clientWidth,offsetWidth之全然具体解释
HTML:scrollLeft,scrollWidth,clientWidth,offsetWidth究竟指的哪到哪的距离之全然具体解释scrollHeight: 获取对象的滚动高度. scrol ...
- H5,PC网页屏幕尺寸相关整理(scrollLeft,scrollWidth,clientWidth,offsetWidth)
HTML:scrollLeft,scrollWidth,clientWidth,offsetWidth到底指的哪到哪的距离之完全详解scrollHeight: 获取对象的滚动高度. scrollLef ...
- HTML精确定位:scrollLeft,scrollWidth,clientWidth,offsetWidth完全详细的说明
HTML:scrollLeft,scrollWidth,clientWidth,offsetWidth具体指完全解释究竟哪里的距离scrollHeight: 获取对象的高度滚动. scrollLe ...
- 转 HTML精确定位:scrollLeft,scrollWidth,clientWidth,offsetWidth之完全详解
HTML:scrollLeft,scrollWidth,clientWidth,offsetWidth到底指的哪到哪的距离之完全详解 scrollHeight: 获取对象的滚动高度. scrollLe ...
- scrollWidth,clientWidth,offsetWidth的区别
通过一个demo测试这三个属性的差别. 说明: scrollWidth:对象的实际内容的宽度,不包边线宽度,会随对象中内容超过可视区后而变大. clientWidth:对象内容的可视区的宽度,不包 ...
- web前端学习笔记---scrollWidth,clientWidth,offsetWidth的区别
通过一个demo测试这三个属性的差别. 说明: scrollWidth:对象的实际内容的宽度,不包边线宽度,会随对象中内容超过可视区后而变大. clientWidth:对象内容的可视区的宽度,不包滚动 ...
- 转:scrollWidth,clientWidth,offsetWidth的区别
scrollWidth:对象的实际内容的宽度,不包边线宽度,会随对象中内容超过可视区后而变大. clientWidth:对象内容的可视区的宽度,不包滚动条等边线,会随对象显示大小的变化而改变. off ...
随机推荐
- hadoop yarn running beyond physical memory used
老是报物理内存越界,kill container,然后把yarn.scheduler.minimum-allocation-mb设成2048就好了 跟这个yarn.nodemanager.pmem-c ...
- 使用GDB 修改MySQL参数不重启
link:http://blog.chinaunix.net/uid-20785090-id-4016315.html mysql很多参数都需要重启才能生效,有时候条件不允许,可以使用gdb作为最后的 ...
- awk 学习
1. awk用例 今天用awk来统计一个字符出现的次数,总是比实际多一个.查了半天才发现问题所在. 文本tt.txt如下: <lst name="responseHeader" ...
- jenkins 的 ProcessTreeKiller----无法启动子进程的解决办法
参考: http://alanland.iteye.com/blog/2047244 http://scmbob.org/start-process-in-jenkins.html java -Dhu ...
- Android -----listView的属性大全
http://www.cnblogs.com/zhengbeibei/archive/2013/03/29/2988814.html 01 <?xml version="1.0 ...
- Codeforces Round #160 (Div. 2) D. Maxim and Restaurant(DP)
题目链接 想了挺久,枚举每一件物品,当做关键物品,假设再加这一件物品,就>=c了,把剩下的物品背一下包,dp[i][j]表示i个物品可以组成重量j的个数. 这样就可以知道前面放i件,后边肯定放n ...
- JS调用水晶报表打印翻页按钮事件
默认的水晶报表打印按钮.翻页按钮太小,并且样式不好调整,考虑自己做一个按钮,然后调用水晶报表的按钮事件. 在实际操作中发现可以在.net按钮的服务器端事件中调用翻页方法: CrystalReportV ...
- Linux多线程实例练习 - pthread_create()
Linux多线程实例练习 pthread_create():创建一个线程 int pthread_create(pthread_t *tidp, const pthread_attr_t *attr, ...
- 广播变量、累加器、collect
广播变量.累加器.collect spark集群由两类集群构成:一个驱动程序,多个执行程序. 1.广播变量 broadcast 广播变量为只读变量,它由运行sparkContext的驱动程序创建后发送 ...
- mysql慢日志管理
一.日志切割 原理: 1.cp一个慢日志备份 2.清空原理的慢日志 3.写成脚本,每天一切,这样就ok啦 二.查找日志中的慢日志 1.做了日志切割(慢日志文件就小了) 2.查找某个时间的慢日志 日志时 ...