bootstrap button on click showing default colour

前端 未结 7 548
广开言路
广开言路 2021-01-31 08:13

I am trying to style the button colour with below code, the colours work until I click the button, the button shows the default colours, how do I specify the colours of the butt

7条回答
  •  清酒与你
    2021-01-31 08:58

    Some inspiration from the bootstrap source for overriding these various button states where $off-white and $brand-black are defined by us:

    .btn-success {
      &:hover,
      &:focus,
      &.focus {
        color: $off-white;
        background-color: $brand-black;
      }
    
      &:active,
      &.active,
      &.disabled,
      &:disabled {
        color: $off-white;
        background-color: $brand-black;
    
        &:focus,
        &.focus {
          color: $off-white;
          background-color: $brand-black;
        }
      }
    }
    

提交回复
热议问题