Div {
Background-color: Red \ 0;/* Internet Explorer 8/9 */
Background-color: Blue \ 9 \ 0;/* ie 9 */
* Background-color: green;/* IE 7 */
_ Background-color: Gray;/* IE 6 */
}
Pay attention to the csshack write order, where:
1. Background-color: Red \ 0; supported by IE8 and ie9;
2. Background-color: Blue \ 9 \ 0; only supported by ie9;
(1) Difference between FF (IE8) and IE6 IE7
Backgorund: orange; FF and IE8 background colors will be orange
* Backgorund: red; the background colors of IE6 and IE7 will be red.
(2) Difference between FF (IE8) and IE6 and IE7
Background: orange; FF and IE8 background colors will be orange
* Background: red! Important; IE7 background color will be red
* Background: Blue; the background color of IE6 is blue.
(3) Difference between FF (IE8) and IE6 and IE7
Background: orange; FF and IE8 background colors will be orange
* Background: red; the background color of IE7 is red.
_ Background: Blue; IE6 background color will be blue
(4) Difference between FF and IE6 IE7 IE8 ie9
Color: gray; FF and other non-IE browser font colors will be gray
Color: Red \ 9; IE8 ie9 font color will be red
* Color: green; The IE7 font color will be green
_ Color: Blue; IE6 font color will be blue
Tip: CSS hack writing sequence: Write the style required by ff and other non-ie browsers, followed by the style required by IE8/9, followed by IE7, followed by IE6!
Conclusion: I feel less useful in practical use! Important, as long as you remember "*" and "_", I think it is enough to distinguish ff (IE8) from IE6 and IE7.