表格中奇数行和偶数行使用不同颜色的背景样式

/* 偶数行背景使用样式: */
table tr:nth-child(even){
background:cadetblue;
}

/* 奇数行背景使用样式: */
table tr:nth-child(odd){
background:darkslategray;
}
posted @ 2019-07-12 14:56  IanWeberr  阅读(1007)  评论(0编辑  收藏  举报