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

前端 未结 11 1894
情歌与酒
情歌与酒 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:31

    This is for bootstrap v4 compiled via grunt or some other task runner

    You would need to change $table-hover-bg to set the highlight on hover

    $table-cell-padding:            .75rem !default;
    $table-sm-cell-padding:         .3rem !default;
    
    $table-bg:                      transparent !default;
    $table-accent-bg:               rgba(0,0,0,.05) !default;
    $table-hover-bg:                rgba(0,0,0,.075) !default;
    $table-active-bg:               $table-hover-bg !default;
    
    $table-border-width:            $border-width !default;
    $table-border-color:            $gray-lighter !default;
    

提交回复
热议问题