悬停和仅当未禁用时为活动 [英] Hover and Active only when not disabled

查看:75
本文介绍了悬停和仅当未禁用时为活动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用悬停活动禁用来设置样式按钮。

I use hover, active and disabled to style Buttons.

如何应用悬停并仅在启用的按钮上启用?

How to apply hover and active only on enabled buttons?

推荐答案

您可以使用:enabled < a>伪类,但通知 IE <9 不支持

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

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

这篇关于悬停和仅当未禁用时为活动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆