总结:IE6不支持的CSS选择符

本文列举了五种IE6不支持的CSS选择符,大家设计网页时要注意。

1、child selector

h1 > strong { color:red;} 无效,只能使用 h1 strong {color:red; },不支持子选择符,但支持派生选择符。

2、sibling selector

li+li { font-style:bold; } 无效。

3、Pseudo-Class Selector有限支持

a:link :visited  { color:#fff;},只认最后一个:visited.

最好按如下顺序写:

a:link {color: navy;}
a:visited {color: gray;}
a:hover {color: red;}
a:active {color: yellow;}

IE6对伪类选择符支持,也仅限于超链。  

4、attribute selector

h1[class] {color: silver;} 无效。

上面的不支持,Eric Meyer的CSS权威指南都指出了,我也在主流环境验证过,IE6 SP1/WIN XP。

5、但Eric Meyer书中说,IE对多类选择符不支持并不正确,至少对IE6而言,并非如此。

.warning.urgent {background: silver;} 有效,并非无效。

评论: 0 | 引用: 0 | 查看次数: 4111
发表评论
登录后再发表评论!