CSS 目标IE6,IE7,IE8

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了CSS 目标IE6,IE7,IE8相关的知识,希望对你有一定的参考价值。

IE8 and Below

The key to targeting Internet Explorer 8 and below, with a hack, is to append "\9� to the end of your style. For example: 

body {
 color: red; /* all browsers, of course */
 color : green\9; /* IE8 and below */
}

E7 and Below

we can use the * symbol to target IE7 and below, like so: 

body {
 color: red; /* all browsers, of course */
 color : green\9; /* IE8 and below */
 *color : yellow; /* IE7 and below */
}

IE6

body {
 color: red; /* all browsers, of course */
 color : green\9; /* IE8 and below */
 *color : yellow; /* IE7 and below */
 _color : orange; /* IE6 */
}

以上是关于CSS 目标IE6,IE7,IE8的主要内容,如果未能解决你的问题,请参考以下文章