IE:nth-child()使用odd / even不工作 [英] IE: nth-child() using odd/even isn't working
本文介绍了IE:nth-child()使用odd / even不工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我的表格(完全适用于Chrome,FireFox和Opera)在Internet Explorer上无法正确显示。
My table (that works perfectly on Chrome, FireFox and Opera) is not displaying correctly on Internet Explorer.
背景保持白色! (我使用的是IE-8)
The background remains white! (I am using IE-8)
CSS代码:
/*My Table*/
.my_table{
border-collapse:collapse;
font:normal 14px sans-serif,tahoma,arial,verdana;
margin:5px 0;
}
.my_table th{
color:#fff;
background:#5E738A;
border:1px solid #3C5169;
text-align:center;
padding:4px 10px;
}
.my_table td{
color:#555;
border:1px solid #C1CAD4;
text-align:center;
padding:2px 5px;
}
.my_table tr:nth-child(even){
background:#E6EDF5;
}
.my_table tr:nth-child(odd){
background:#F0F5FA;
}
推荐答案
IE8不支持 nth-child
选择器我害怕:
IE8 doesn't support the nth-child
selector I'm afraid:
http://reference.sitepoint.com/css/pseudoclass-nthchild
这篇关于IE:nth-child()使用odd / even不工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文