使用:
$('#menu a').animate({backgroundColor: 'rgba(245, 245, 245, 0.4)'})
在我的文档中使用jquery.animate-colors ...工作正常但是正在杀死#menu的悬停状态......
我尝试用
重置它$("#menu a:hover").css("backgroundColor", "#ddd");
无济于事。
想法?
答案 0 :(得分:0)
先前指定的CSS :hover
已被jQuery样式所取代。 JS / jQuery将它的样式放在内联类型属性<div style=""></div>
中,从而覆盖了CSS中设置的样式。但是,只需放置关键字!important
。
#test:hover {background-color:#000 !important;}