Browser Specific CSS Hack Codes
CSS Hacks for IE6,IE7,IE8,IE9 and IE10
CSS Hacks for Mozilla Firefox
Firefox 2
#csszilla {
color:red; /* All browsers */
color:red !important;/* All browsers but IE6 */
_color:red; /* Only works in IE6 */
*color:red; /* IE6, IE7 */
+color:red;/* Only works in IE7*/
*+color:red; /* Only works in IE7 */
color:red\9; /* IE6, IE7, IE8, IE9 */
color:red\0; /* IE8, IE9 */
color:red\9\0;/*Only works in IE9*/
}
==============================================================================================================
CSS Hacks for Mozilla Firefox
Firefox 2
html>/**/body .selector, x:-moz-any-link {
color:lime;
}
color:lime;
}
Firefox 3
html>/**/body .selector, x:-moz-any-link, x:default {
color:lime;
}
Any Firefox
@-moz-document url-prefix() {
.selector {
color:lime;
}
}
==============================================================================================================
CSS Hacks for Google Crome
/* will be red only in google chrome */
#test1{color:green;}
@media screen and (-webkit-min-device-pixel-ratio:0) {
#test1{color:red;}
}
/* will be red only in opera and google chrome */
#test2{
color:green;
-bracket-:hack(;
color:red;
);
}
==============================================================================================================
CSS Hacks for Safari
/* Safari 2 - 3.1 */
html[xmlns*=""]:root #trece { color: red}
==============================================================================================================
CSS Hacks for Iphone
/* iPhone / mobile webkit */
@media screen and (max-device-width: 480px) {
#veintiseis { color: red }
}
Ref:https://css-tricks.com/snippets/css/css-hacks-targeting-firefox/
http://mynthon.net/howto/-/webdev
Comments
Post a Comment