在移动端页面中,系统默认能常按选中区域 现在因为交互操作的需要,我想取消这个功能,应该怎操作?
用preventDefault()取消默认事件就可以了,我也是这样。
法一:
html { -webkit-user-select: none; }
法二:
div { pointer-events: none; }
法三:
window.ontouchstart = function(e) { e.preventDefault(); };
在css文件中,加入* { -webkit-user-select: none; }