问题
Possible Duplicate:
How to make CSS visible only for Opera
Many times I need to use browser specific CSS rules to make the design look alike in every browser. Generally I need them for IE 7-8, but this time is for Opera, specifically Opera 12 and on.
I found some solutions for Opera:
- Make CSS apply only for Opera 11?
- How to make CSS visible only for Opera
But these only work for 11 or below...
Is there a solution for Opera 12?
回答1:
Here is an officially recommended hack for Opera (in case everything else fails):
doesnotexist:-o-prefocus, .example {
color: red;
}
http://www.opera.com/docs/specs/presto2.12/css/o-vendor/
via: https://stackoverflow.com/a/4021618
p.s.: notice comment by davehale32, that this hack does not work for IE6. I have no IE6 at my disposal now, so i can't confirm or deny that.
来源:https://stackoverflow.com/questions/12389782/css-specific-rule-for-opera-12