.A1 a:link {
width: 20px;
height: 20px;
background-color: #FF8000;
border-radius: 23px;
border: 3px solid #FFFFFF;
position: absolute;
}
.A1 a:visited {
width: 20px;
height: 20px;
background-color: #FF8000;
border-radius: 23px;
border: 3px solid #FFFFFF;
position: absolute;
}
.A1 a:hover {
width: 20px;
height: 20px;
background-color: #FF8000;
border-radius: 23px;
border: 3px solid #FFFFFF;
position: absolute;
}以上是css样式
$(document).ready(function() {
$(".B1").hover(function() {
$(".A a:link").css("background-color", "red");
}, function() {
$(".A a:link").css("background-color", "#FF8000");
});
});这是jQuery语句
因为需要同时A1和B1来改变A1的样式.所以用jQuery写了B1改变A1的方法.但是B1hover触发后会导致A1的hover失效.
应该是优先级之类的问题,但是请问如何解决
-------------------------------------------------------------------------------------------------------------------------
问题解决了,在css的hover中加入!important即可//
话说没法把问题删了吗
闹小志
weibo_哆啦A梦有大口袋_0
weibo_哆啦A梦有大口袋_0