你对IE6不支持的五种CSS选择符是否了解,这里和大家分享一下,希望大家设计网页时要注意。
IE6不支持的CSS选择符
本文列举了五种IE6不支持的CSS选择符,大家设计网页时要注意。
1.childselector
h1>strong{color:red;}无效,只能使用h1strong{color:red;}不支持子选择符,但支持派生选择符。
2.siblingselector
li+li{font-style:bold;}无效。
3.Pseudo-ClassSelector有限支持。
a:link:visited{color:#fff;},只认最后一个:visited.
最好按如下顺序写:
- a:link{color:navy;}
- a:visited{color:gray;}
- a:hover{color:red;}
- a:active{color:yellow;}
IE6对伪类选择符支持,也仅限于超链。
4.attributeselector
h1[class]{color:silver;}无效。
上面的不支持,EricMeyer的CSS权威指南都指出了,我也在主流环境验证过,IE6SP1/WINXP。
5.但EricMeyer书中说,IE对多类选择符不支持并不正确,至少对IE6而言,并非如此。
.warning.urgent{background:silver;}有效,并非无效。
本篇文章来自<Ahref='http://www.soidc.net'>IDC专家网</a>原文链接:http://www.soidc.net/articles/1213781627945/20070828/1214036673903_1.html
【编辑推荐】