4***@qq.com
4***@qq.com
  • 发布:2016-11-10 15:08
  • 更新:2017-11-28 16:19
  • 阅读:1670

APP怎么禁用掉长按后的文字选择框

分类:HTML5+

APP怎么禁用掉长按后的文字选择框,就是长按选字然后可以拷贝的那个,可以禁用掉吗?

2016-11-10 15:08 负责人:无 分享
已邀请:
gmmx133

gmmx133

document.documentElement.style.webkitUserSelect='none';  
document.documentElement.style.webkitTouchCallout='none';
  • n***@163.com

    这段代码是要加在哪里?


    2017-11-28 11:36

gmmx133

gmmx133

javascript 里面
也可以使用 css

* {  
  -webkit-touch-callout:none;  
  -webkit-user-select:none;  
  -khtml-user-select:none;  
  -moz-user-select:none;  
  -ms-user-select:none;  
  user-select:none;  
}

该问题目前已经被锁定, 无法添加新回复