-
手指在屏幕上滑动时,页面跟随移动
-
当手指离开屏幕时,计算手指在屏幕上停留的时间
-
如果停留时间小于300ms,则认为是快速滑动切换,页面切换到下一页
-
如果停留时间大于300ms,则认为是慢速滑动,慢速滑动按如下规则处理:
-
如果滑动距离小于屏幕宽度的50%,则回退到上一页
-
如果滑动距离大于屏幕宽度的50%,则切换到下一页
lienonegithub / guesture Goto Github PK
View Code? Open in Web Editor NEWThis project forked from git-onepixel/guesture
H5单页面手势滑屏切换
Home Page: http://onepixel.top/app/guesture/index.html
License: MIT License