IOS真机下canvas触摸移动如何不让页面上下移?在线等,挺急的,谢谢!

发布于 7 年前作者 uyin11972 次浏览最后编辑 7 年前来自 ask

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

2 回复
dfan
dfan1 楼6 年前

 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>

mingluo
mingluo2 楼5 年前

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