css给奇数行或偶数行添加指定样式

odd表示奇数行,even表示偶数行;
tr:nth-child(odd);
.table-striped > tbody > tr:nth-child(odd) {
  1. background-color: #f9f9f9;
}
posted @ 2017-12-16 15:55  xzzzys  Views(11415)  Comments(0Edit  收藏  举报