对于常用操作的记录
移动端禁止缩放
只需要添加meta信息即可实现。
<meta name="viewport" content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=0">
禁止选中/复制
css方式
* {
-moz-user-select: none;
-o-user-select:none;
-khtml-user-select:none;
-webkit-user-select:none;
-ms-user-select:none;
user-select:none;
}
body标签方式
<body oncontextmenu="return false;" onselectstart="return false">
js方式
document.oncontextmenu=function(){return false;};
document.onselectstart=function(){return false;};