Hover and Active only when not disabled

后端 未结 7 2092
长情又很酷
长情又很酷 2020-12-22 21:29

I use hover, active and disabled to style Buttons.

But the problem is when the button is disabled the hover and ac

7条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-22 22:11

    You can use :enabled pseudo-class, but notice IE<9 does not support it:

    button:hover:enabled{
        /*your styles*/
    }
    button:active:enabled{
        /*your styles*/
    }
    

提交回复
热议问题