This repository has been archived on 2023-08-30. You can view files and clone it, but cannot push or open issues/pull-requests.
bytedo
/
wcui
Archived
1
0
Fork 0

优化滚动距离获取

old
宇天 2017-09-27 19:35:10 +08:00
parent 77145c5561
commit 82a448ea0f
1 changed files with 2 additions and 2 deletions

View File

@ -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