How to change color of Bootstrap disabled button?

后端 未结 3 724
悲&欢浪女
悲&欢浪女 2021-02-12 20:17

I am using a bootstrap button on a page of my website and I want to change the color of a disabled button. A button that is \"grayed out\" and you cannot click. Is there a way I

3条回答
  •  陌清茗
    陌清茗 (楼主)
    2021-02-12 20:32

    In case your button look like this:

    
    

    the next CSS code will change its color (when disabled only):

    .btn.btn-primary[disabled] {
        background-color: #00ff00;
    }
    

    or

    .btn.btn-primary:disabled{
        background-color: #00ff00;
    }
    

提交回复
热议问题