powy1993 / fullpage

For desktop(ie5.5+) or mobile webApp without jQuery,create full screen pages fast and simple.
http://1.fullpagechris.sinaapp.com/index.html
750 stars 267 forks source link

step属性不能正常过渡 #56

Closed MaskWu closed 5 years ago

MaskWu commented 5 years ago

移动端在page上新增了step属性 滑动时会先显示下一个页面然后回滚到当前页面进行step设定的动画

powy1993 commented 5 years ago

step里面的动画是你自己用css3写的过渡,和组件没有关系,就是说你从 classA -> classB 中间自己设置 transition

MaskWu commented 5 years ago

我用了demo里面的fullpage.html也是这样,page3中设置了step4,但每次滑动会先显示page4然后再回到page3显示page3中对应的step动画 环境是 ip XR 微信7.0.4

powy1993 commented 5 years ago

PC上我用手机模拟也没有这个问题,是微信特有的问题吗?

MaskWu commented 5 years ago

PC我这边用手机模拟也是没有问题的 移动端chrome测试也是有上述问题的

powy1993 commented 5 years ago
document.body.ontouchmove = function(e) {
    e.preventDefault();
}

我在html底部额外加了这句就好了, 但是其实源码里面就有这句, 不知道是不是某个版本的浏览器阻止了额外js去禁止滑动。

powy1993 commented 5 years ago

你可以试一下这个链接 fix #56 - step属性不能正常过渡

MaskWu commented 5 years ago

测试加了e.preventDefault();可以了,感谢