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的主要内容,如果未能解决你的问题,请参考以下文章

CSS 如何针对IE6,IE7和IE8

CSS IE6,IE7,IE8的阴影和渐变填充

Css Hack 大全(IE6IE7IE8IE9 css hack)

浏览器兼容 IE6IE7IE8FirefoxOpera CSS hack区分

DIV+CSS 网页兼容性问题(IE6 IE7 IE8 IE9 火狐 chorm)

IE6IE7IE8的阴影和渐变填充