获取元素在页面的绝对位置
源代码:
以下是代码片段: var getCoords = function (el) { |
其中self.pageYOffset为window.self.pageYOffset,是火狐的一个属性,相当于document.body.scrollTop。以下是它的定义:
Definition: The pageYOffset property is used to determine the Y coordinate of the scroll position in some browsers. This is not a reserved word so you can declare your own variable or function called pageYOffset but if you do then you will not be able to find or alter the scroll position of a window in some browsers.
扫一扫订阅我的微信号:IT技术博客大学习
- 作者:小寒 来源: 记事本
- 标签: 绝对位置
- 发布时间:2010-08-04 00:06:48
-
[73] 使用exp/imp 导入11g数据到9i
-
[63] Java开发岗位面试题归类汇总
-
[50] 如何拿下简短的域名
-
[48] 关于恐惧的自白
-
[47] find命令的一点注意事项
-
[47] 流程管理与用户研究
-
[46] Go Reflect 性能
-
[46] WEB系统需要关注的一些点
-
[46] 图书馆的世界纪录
-
[45] IOS安全–浅谈关于IOS加固的几种方法