这是我做计算器时,取消鼠标双击或选中文档时写的css代码(可兼容谷歌,火狐,欧朋等浏览器):
*{
margin:0;
padding:0;
box-sizing:border-box;
font-family:Georgia, Times, 'Microsoft Yahei', serif;
-webkit-user-select:none; /* Safari 和 Chrome */
-moz-user-select:none; /* 老的 Firefox */
-o-user-select:none; /* Opera */
user-select:none;
}