-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
1.touch事件无法兼容PC端,不建议使用。
可以考虑这三个事件
onmousedown (当元素上按下鼠标按钮时触发。)
onmousemove ( 当鼠标指针在元素上移动时触发。)
onmouseup (当在元素上释放鼠标按钮时触发)
2.为什么你的moveScrollY 方法里 ,ranslateY 的计算是通过 “ranslateY += 1;translateY--; ”得出的?
touchmove过程中触发的事件是均匀的,你这个在每次touchmove触发的时候+1,或者-1,用户的手速可不会等你啊,所以你的内容移动的速度是跟不上的,用户的手移动的越快,你的偏移量越少,这还得了
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels