1.js方法
$('body').on('touchmove',function(event){
event.preventDefault && event.preventDefault();
event.returnValue=false;
event.stopPropagation && event.stopPropagation();
return false;
})
//或者在對應的事件添加取消默認事件
$('.scrollDiv').on('touchmove',function(event){
event.preventDefault();
})
問題:超出頁面的部分不能滑動顯示出來
2.css方法 (可以解決js方法產生的問題)
//body使用絕對定位 body { position: fixed; }
