1. 程式人生 > >BootStrap table 自定義變色

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就都沒有色的,然後再進行自定義變色就不會受影響了