IOS真机下canvas触摸移动如何不让页面上下移?在线等,挺急的,谢谢!
发布于 6 年前 作者 uyin 11856 次浏览 来自 问答

<canvas disable-scoll=“true” bindtouchstart=“touchStart” bindtouchmove=“touchMove” bindtouchend=“touchEnd” canvas-id="myCanvas></canvas>代码这样但是页面还是可以上下移,看到那些白色部分。请问大神们如何解决?

2 回复

 1.加上  disable-scroll = true

 2.在json页面加上"disableScroll": true,

 

  <canvas canvas-id=“id-gesture-lock” class=“gesture-lock” bindtouchstart=“onTouchStart” bindtouchmove=“onTouchMove” bindtouchend=“onTouchEnd” disable-scoll=“true”></canvas>

你好,请确保已经禁用页面容器本身的滑动。eg: page {overflow: hidden}

回到顶部