CSS hack different properties for each browser:
IE6: _ZOOM:1;IE6/7: *ZOOM:1;IE6/7/8/9: \9
CSS hack different rules for each browser
IE6: *html{}ie7: +.class{} non-ie6:html>body {} Firefox only: @-moz-document Url-prefix () {}saf3+ and Google: @media all and (- webkit-min-device-pixel-ratio:0) {} Opera only: @media All and (-webkit-min-device-pixel-ratio:10000), not all and (- webkit-min-device-pixel-ratio:0) {}iphone/mobile/webkit: @media screen and (max-device-width:480px) {}
However, we should try to avoid it CSS Hack .
- Property:value; / * All browsers * /
- +Property:value; / * IE7 * /
- _property:value; / * IE6 * /
- *Property:value; / * IE6/7 * /
- Property:value\9; / * IE6/7/8/9, ie all Internet Explorer * /
- * HTML selector { ... }; / * IE6 * /
- *:First-child+HTML selector { ... }; / * IE7 * /
- HTML>body selector { ... }; / * Non-IE6 * /
- @-Moz-document URL-prefix() { ... }; / * Firefox * /
- @media all and (-webkit-min-device-pixel-ratio: 0) { ... }; / * saf3+/chrome1+ * /
- @mediaAlland(-Webkit-Min-device-pixel-ratio:10000), not all and (- webkit-min-device< Span class= "pun" >-pixel-ratio: 0) { ... }; /* Opera */
- @media screen and (max-device-width: 480px) { ..... }; / * iphone/mobile webkit * /
CSS hack the CSS of each browser