table-striped
可以使table每一行颜色不同,但是如果不想用默认的,想自己自定义颜色该怎么写呢
只需要在自己的css里面写上:
.table-striped > tbody > tr:nth-child(2n+1) > td,
.table-striped > tbody > tr:nth-child(2n+1) > th {
background-color: rgb(242, 245, 247);//此处是自己想用的颜色
}
上面的2n+1
可以改成odd
或者even