得到了样式的css表但由于某种原因行样式被切断,css检查器显示任何明显的错误。附件是css和表
问题的例子
see codepen
答案 0 :(得分:3)
在background
上使用td
代替tr
将解决您的问题。
table.striped tr:nth-child(even) td {
background-color: #fff;
}
table.striped tr:nth-child(odd) td{
background-color: #efefef;
}
<强> Updated Codepen 强>