本文介紹了IE:使用奇數(shù)/偶數(shù)的 nth-child() 不起作用的處理方法,對(duì)大家解決問(wèn)題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)吧!
問(wèn)題描述
我的表格(在 Chrome、FireFox 和 Opera 上完美運(yùn)行)在 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
這篇關(guān)于IE:使用奇數(shù)/偶數(shù)的 nth-child() 不起作用的文章就介紹到這了,希望我們推薦的答案對(duì)大家有所幫助,也希望大家多多支持html5模板網(wǎng)!
【網(wǎng)站聲明】本站部分內(nèi)容來(lái)源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問(wèn)題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請(qǐng)聯(lián)系我們刪除處理,感謝您的支持!