更改数据表中的备用行颜色

Lea*_*ner 5 jquery-datatables

我试图使用下面的CSS更改数据表中行的颜色.

table.dataTable tr.odd { background-color: #E2E4FF; }
table.dataTable tr.even { background-color: white; }
Run Code Online (Sandbox Code Playgroud)

这种变化似乎不会影响数据表中的第一列,我可以在其他列中看到新颜色.

有人可以告诉我这个问题的原因吗?

Lea*_*ner 15

使用下面的css解决了这个问题.

    table.dataTable td.sorting_1{ background-color: white; border:1px lightgrey; }
    table.dataTable td{ background-color: white;  border:1px lightgrey;}
    table.dataTable tr.odd { background-color: white;  border:1px lightgrey;}
    table.dataTable tr.even{ background-color: white; border:1px lightgrey; }
Run Code Online (Sandbox Code Playgroud)