Hover and Active only when not disabled

后端 未结 7 2067
长情又很酷
长情又很酷 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 21:59

    One way is to add a partcular class while disabling buttons and overriding the hover and active states for that class in css. Or removing a class when disabling and specifying the hover and active pseudo properties on that class only in css. Either way, it likely cannot be done purely with css, you'll need to use a bit of js.

提交回复
热议问题