【发布时间】:2012-12-15 19:16:45
【问题描述】:
I have a table styled with CSS with even and odd。 td 偶数/奇数 CSS 代码:
#table_box tr:nth-child(odd) td { background-color:#ffffff } /*odd*/
#table_box tr:nth-child(even) td { background-color:#f5f9fa } /* even*/
#table_box tr:hover td { background-color:#fffbae; } /* hovering */
我想要多个偶数/奇数行样式,如下图所示:
我可以用 CSS 做到这一点吗?我正在尝试这样做,但没有显示颜色,并且只是偶数/奇数样式。
【问题讨论】: