Bootstrap table striped: How do I change the stripe background colour?

后端 未结 12 1349
温柔的废话
温柔的废话 2020-12-01 02:21

With Bootstrap class table-striped, every other row in my table has a background colour equal to #F9F9F9. How can I change this colour?

12条回答
  •  暖寄归人
    2020-12-01 02:49

    You have two options, either you override the styles with a custom stylesheet, or you edit the main bootstrap css file. I prefer the former.

    Your custom styles should be linked after bootstrap.

    
    
    

    In custom.css

    .table-striped>tr:nth-child(odd){
       background-color:red;
    }
    

提交回复
热议问题