BootStrap 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);//此处是自己想用的颜色
 }

对于jq中想要变色,会发现,table中的浅色tr可以自定义,深色的无效,解决办法:把 table 的class中的table-striped去掉
例如:
在这里插入图片描述去掉之后,table 的tr就都没有色的,然后再进行自定义变色就不会受影响了

猜你喜欢

转载自blog.csdn.net/zcaixx/article/details/84380707