Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想设置禁用按钮悬停的样式。我可以通过定位来实现这一点,例如:
input[disabled="disabled"]:hover
但是如果我想针对禁用的唯一子按钮输入悬停怎么办?我可以做类似的事情吗
input[type="button"]:disabled:only-child:hover
???
是的,您可以按照您的要求进行操作:
input[type=button]:disabled:only-child:hover
效果很好:http: //jsfiddle.net/TekUR/