Open yangbo5207 opened 8 years ago
如果让整个页面都禁止选择,可以使用下面的css
body{ -webkit-touch-callout: none; -webkit-user-select: none; -khtml-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; }
如果希望指定元素禁止选择
*.unselectable { -moz-user-select: -moz-none; -khtml-user-select: none; -webkit-user-select: none; /* Introduced in IE 10. See http://ie.microsoft.com/testdrive/HTML5/msUserSelect/ */ -ms-user-select: none; user-select: none; }
如果让整个页面都禁止选择,可以使用下面的css
如果希望指定元素禁止选择