在h5页面,在某些场景下我们是不希望用户长按出现系统默认的菜单的,
可以通过以下css实现,还要考虑给input开放允许
*{//禁止h5长按调起系统菜单
-webkit-touch-callout:none; /*系统默认菜单被禁用*/
-webkit-user-select:none; /*webkit浏览器*/
-khtml-user-select:none; /*早期浏览器*/
-moz-user-select:none;/*火狐*/
-ms-user-select:none; /*IE10*/
user-select:none;
}
input,textarea {
-webkit-user-select:auto; /*webkit浏览器*/
-khtml-user-select:auto; /*早期浏览器*/
-moz-user-select:auto;/*火狐*/
-ms-user-select:auto; /*IE10*/
user-select:auto;
}