【发布时间】:2018-04-14 22:28:15
【问题描述】:
<style>
#font{
font-size: 20px;
color:#0000cd;
}
tr:nth-child(n+7) {
background-color: #d3d3d3;
}
table {
border-spacing: 0;
}
</style>
如何只为特定数量的行着色? 这里只有我显示器的前 7 行是白色的,其余的是灰色的。我想要7行白色,7灰色,7白色,7灰色等等......
【问题讨论】:
-
只需在其中的 7 个中添加一个公共类,依此类推
标签: html css css-selectors