How do I change the hover over color for a hover over table in Bootstrap?

前端 未结 11 1903
情歌与酒
情歌与酒 2021-01-30 02:58

I have a table with class \'table-hover\'. The default hover over color is a white / light grey. How do I change this color?

I\'ve tried overwriting the default by ad

11条回答
  •  情歌与酒
    2021-01-30 03:29

    HTML CODE:

    CSS CODE

    .table-hover thead tr:hover th, .table-hover tbody tr:hover td {
        background-color: #D1D119;
    }
    

    The css code indicate that:

    mouse over row:

    .table-hover > thead > tr:hover

    background color of th will change to #D1D119

    th

    Same action will happen for tbody

    .table-hover tbody tr:hover td

    提交回复
    热议问题
    Firstname Lastname Email
    John Doe john@example.com
    Mary Moe mary@example.com
    July Dooley july@example.com