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

后端 未结 12 1364
温柔的废话
温柔的废话 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 03:12

    With Bootstrap 4, the responsible css configuration in bootstrap.css for .table-striped is:

    .table-striped tbody tr:nth-of-type(odd) {
      background-color: rgba(0, 0, 0, 0.05);
    }
    

    For a very simple solution, I just copied it into my custom.css file, and changed the values of background-color, so that now I have a fancier light blue shade:

    .table-striped tbody tr:nth-of-type(odd) {
      background-color:  rgba(72, 113, 248, 0.068);
    }
    

提交回复
热议问题