First of all, thanks to"Wanzi"CSS hack provided by IE8;
Those who have followed IE8's CSS hack believe that everyone is using this hack, which is the CSS hack of "\ 9:
. Test {
Color: #000000;/* ff, OP supported */
Color: # 0000ff \ 9;/* all IE browsers (IE6 +) support; however, IE8 cannot recognize "*" and "_" CSS hack; so we can write hack */
[Color: #000000; color: #00ff00;/* SF, CH support */
* Color: # FFFF00;/* IE7 supported */
_ Color: # ff0000;/* IE6 support */
}
This is also used by myself 《CSS hack of mainstream browsers.
Many people study why the IE6-IE8 in color: # 0000ff \ 9; supports "\ 9" writing, and its principle. I am just an engineer, not a scientist, I don't know why or why it really works! Very ashamed!
Return to CSS hack of IE8 and talk about color: # 0000ff \ 9:
Color: # debuff \ 9 hack supports IE6-IE8 (other versions are not tested), but IE8 does not recognize "*" and "_" CSS hack, so we can use
Color: # 0000ff \ 9;/* IE6, IE7, IE8 */
* Color: # FFFF00;/* IE7 */
_ Color: # ff0000;/* IE6 */
To distinguish ie versions.
I do not know why "\ 9" is used, but"WanziThe other 0-13 numbers are tested. The final result is as follows:
OP indicates opera, sa indicates safari, and CH indicates chrome. If you have patience, you can test "\ 14", "\ 15", and "\ 16 "...
From the test results above, we can see that "\ 0" is only recognized by IE8, IE6, and IE7 are not recognized, so "\ 0" should be the real hack of IE8. CSS hack of mainstream browsers is better:
. Test {
Color: #000000;/* ff, OP supported */
Color: # 0000ff \ 0;/* IE8 supported */
[Color: #000000; color: #00ff00;/* SF, CH support */
* Color: # FFFF00;/* IE7 supported */
_ Color: # ff0000;/* IE6 support */
}
OP indicates opera, sa indicates safari, and CH indicates chrome;
I only share resources. I am not confused.