CSS禁止用户选择复制
-webkit-user-select:none ;
-moz-user-select:none;
user-select:none;
PS(选值):
user-select: text | none | all | auto | contain
none:
文本不能被选择
text :
可以选择文本(默认值)
all :
当所有内容作为一个整体时可以被选择。如果双击或者在上下文上点击子元素,那么被选择的部分将是以该子元素向上回溯的最高祖先元素。
auto :
文本将根据浏览器的默认属性进行选择
contain、element :
可以选择文本,但选择范围受元素边界的约束,也就是选择的文本将包含在该元素的范围内。只支持Internet Explorer
/firefox浏览器/
-moz-user-select: none|text|all;
/safari、chrome浏览器/
-webkit-user-select: none|text|all; /Safari中不支持该属性值,只能使用none或者text,或者是在html的标签属性中使用/
/ie浏览器/
-ms-user-select: none|text|element;