根据 Can I use显示,目前user-select已经支持绝大多数浏览器了,不过若是想在IE9或者更早以前使用,还须要使用浏览器前缀。
代码以下html
. noselect{ -webkit-touch-callout: none; /* iOS Safari */ -webkit-user-select: none; /* Safari */ -khtml-user-select: none; /* Konqueror HTML */ -moz-user-select: none; /* Firefox */ -ms-user-select: none; /* Internet Explorer/Edge */ user-select: none; /* 没有前缀,目前支持Opera和谷歌浏览器 */ }