Hover and Active only when not disabled

后端 未结 7 1989
长情又很酷
长情又很酷 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:10

    Why not using attribute "disabled" in css. This must works on all browsers.

    button[disabled]:hover {
        background: red;
    }
    button:hover {
        background: lime;
    }
    

提交回复
热议问题