解决方法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