Skip to content

Commit a9d4365

Browse files
committed
Neuer Opera-Hack, da der alte nicht im 12er funktionierte
http://bricss.net/post/11230266445/css-hack-to-target-opera
1 parent 6fbc3b8 commit a9d4365

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

index.html

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
* * 1.4.2 changed the \9 hack to \0 as it appears to be more reliable in IE9
2525
* * 1.5 adding Support for Firefox 4 thanks to Estelle Weyl
2626
* * 1.5.1 changed \0 back to \9 as \0 was also triggering Opera while \9 does not
27+
* * 1.5.2 added an Opera-hack
2728
-->
2829

2930
<style type="text/css">
@@ -111,17 +112,23 @@
111112
}
112113
}
113114

114-
/* Opera */
115+
/* Opera - doesn't work in Opera 12 */
115116
@media all and (-webkit-min-device-pixel-ratio:10000), not all and (-webkit-min-device-pixel-ratio:0) {
116117
head~body #opera {
117118
display: block;
118119
}
119120
}
121+
122+
/* Opera again - works in Opera 12 */
123+
x:-o-prefocus, #opera2 {
124+
display: block;
125+
}
120126
</style>
121127

122128
</head>
123129
<body>
124130
<p id="opera">Opera 7.2+</p>
131+
<p id="opera2">Opera (smaller rule)</p>
125132
<p id="webkit">Webkit (Safari and Chrome)</p>
126133
<p id="firefox2">Firefox 2 and 3</p>
127134
<p id="firefox3">Firefox 3+</p>

0 commit comments

Comments
 (0)