有用户选择Opera 10.62和IE9吗? [英] Is there user-select for Opera 10.62 and IE9?

查看:172
本文介绍了有用户选择Opera 10.62和IE9吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直试图应用用户选择为Opera 10.62和IE9没有成功。我不能/不会使用 preventDefault()的JavaScript绑定事件,因为有很多地方要设置为不可选,我仍然需要在几个地方保留选择。事实上,我希望整个文档的默认行为是不可选的,因为我已经在我的样式表中设置以下:

I have been trying to apply user-select for both Opera 10.62 and IE9 without success. I can't/won't bind events with JavaScript that preventDefault(), because there are so many places to be set unselectable and I still need to retain selections in several places. In fact, I want the default behavior to be unselectable for the whole document, and as for that I have set the following in my stylesheet:

* {
    -o-user-select: none;
    -webkit-user-select: none;
    -moz-user-select: -moz-none;
    -khtml-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

Firefox 4,Chrome 7和Safari 5都可以使用。 Opera 10.62不工作,因为我想他们。任何想法?

Everything works great with Firefox 4, Chrome 7 and Safari 5. Only IE9 and Opera 10.62 are not working as I would like them to. Any ideas?

PS:我的目标是现代浏览器。

PS: I'm targeting modern browsers.

推荐答案

p>您尝试使用 :: 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-selection



//更新//

还有不可选择属性。

这篇关于有用户选择Opera 10.62和IE9吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆