首页 > 编程知识 正文

滑动验证屏幕跟着走,手机滑动验证码怎么滑页面会动

时间:2023-05-03 14:49:11 阅读:53864 作者:3040

解决方法1 :

html{

touch-action:none;

touch-action:pan-y;

}

解决方法2 :

var startX,startY;

文档.高级监听器(“touch start”,function(e ) )。

startx=e.target touches [0].pagex; starty=e.target touches [0].pagey; );

文档.高级监听器(“touch move”,function(e ) {

varmovex=e.target touches [0].pagex; varmovey=e.target touches [0].pagey; if(math.ABS(movex-startx ) math.ABS (movey-starty ) ) {e.preventDefault; },{passive:false};

————————————————

这是CSDN博客的“技术金”原创文章,符合CC 4.0 BY-SA版权合同。 请附上原文来源的链接和本声明。

原文链接: https://blog.csdn.net/QQ _ 40121308/article/details/112311239

版权声明:该文观点仅代表作者本人。处理文章:请发送邮件至 三1五14八八95#扣扣.com 举报,一经查实,本站将立刻删除。