优化滚动距离获取
parent
77145c5561
commit
82a448ea0f
|
@ -97,8 +97,8 @@ define(['yua'], function(){
|
||||||
dy = cst[5]
|
dy = cst[5]
|
||||||
|
|
||||||
//滚动条的偏移
|
//滚动条的偏移
|
||||||
bst = document.body.scrollTop
|
bst = document.documentElement.scrollTop
|
||||||
bsl = document.body.scrollLeft
|
bsl = document.documentElement.scrollLeft
|
||||||
|
|
||||||
// 计算元素的offset值, 需要修正
|
// 计算元素的offset值, 需要修正
|
||||||
ox = offset.left - dx - bsl
|
ox = offset.left - dx - bsl
|
||||||
|
|
Reference in New Issue