IE: nth-child() using odd/even isn't working

前端 未结 5 1608
你的背包
你的背包 2020-12-13 19:56

My table (that works perfectly on Chrome, FireFox and Opera) is not displaying correctly on Internet Explorer.

The background remains white! (I am using IE-8)

<
5条回答
  •  生来不讨喜
    2020-12-13 19:58

    You can use first-child and "+" to emulate nth-child, example:

    tr > td:first-child + td + td + td + td + td + td + td + td {
        background-color: red;
    }
    

    That select the 9th column, just like nth-child(9), and that works on IE

提交回复
热议问题