取得元素左和上的偏移量
function getElementLeft(element){ |
获取当前页面的大小
function getViewClient(){ |
scroll相关
- scrollHeight : 在没有滚动条的情况下,元素的高度总和
- scrollWidth: 在没有滚动条的情况下,元素的宽度总和
- scrollTop: 被隐藏在顶部的元素高度
- scrollLeft: 被隐藏在左边的元素像素数
获取文档总高度
var el = document.documentElement; |
function getElementLeft(element){ |
function getViewClient(){ |
var el = document.documentElement; |