Tow*_*wer 11 css opera internet-explorer
我一直试图申请user-selectOpera 10.62和IE9但没有成功.我不能/不会用JavaScript绑定事件preventDefault(),因为有很多地方要设置不可选,我仍然需要在几个地方保留选择.实际上,我希望整个文档的默认行为是不可选择的,至于我在样式表中设置了以下内容:
* {
-o-user-select: none;
-webkit-user-select: none;
-moz-user-select: -moz-none;
-khtml-user-select: none;
-ms-user-select: none;
user-select: none;
}
Run Code Online (Sandbox Code Playgroud)
Firefox 4,Chrome 7和Safari 5的一切都运行良好.只有IE9和Opera 10.62无法正常工作.有任何想法吗?
PS:我的目标是现代浏览器.
你尝试过使用过::selection {color:currentColor;background:transparent}吗?
对于Firefox,您可以使用::-moz-selection.
https://developer.mozilla.org/En/CSS/::selection
http://msdn.microsoft.com/en-us/library/ff974109(v=VS.85).aspx
http://reference.sitepoint的.com/CSS/pseudoelement选择