页面禁止长按选择文字

//长按禁止选择文字
* { -webkit-touch-callout:none; -webkit-user-select:none; -khtml-user-select:none; -moz-user-select:none; -ms-user-select:none; user-select:none; }

如果是想禁用长按弹出菜单, 用 js

  node.addEventListener('contextmenu', function(e){
    e.preventDefault();
  });

 

posted @ 2018-02-09 10:16  Tane  阅读(366)  评论(0编辑  收藏  举报