开发者

How to reset -moz-user-select to be selectable?

I have applied * {-moz-user-select: none;} to the main stylesheet, because there are more unselectable elements than those that are selectable. I then tried to set -moz-user-select: auto; to an input, but it doe开发者_运维技巧s not work. I have also tried the value of text and all, both do not work.

Also it seems that user-select does not work in IE9 and Opera 10.62 or am I missing something?

I am trying to disable selection by default for all browsers, and then explicitly enable it for some elements like input.


Why oh why are you using the universal selector? Please, you have to be more specific with your selectors than that.

As to the answer to your question, reading the MDC documentations carefully, you'll see that the -moz-none value is the one you're looking for, not none:

-moz-none

The text of the element and sub-elements cannot be selected, but selection can be enabled on sub-elements using -moz-user-select: text.

Set this to the universal selector, and you'll be fine. See this demo to see it working live: http://jsfiddle.net/KqJ7R/

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜