我尝试添加 transition:background 1s; 但菜单背景图像由于某种原因没有转换。我在那里做错了什么?
#menu{
padding-top:18px;
transition:background 1s;
-moz-transition:background 1s;
}
#menu > li{
float:left;
padding-right:5px
}
#menu .last{
padding-right:0;
}
#menu > li > a{
width:188px;
display:block;
font-size:17px;
color:#000;
background:#fff;
text-transform:uppercase;
font-weight:400;
background: url('../images/IMAGE_A.jpg');;
height:70px;
line-height:64px;
border-top:1px solid #555;
text-align:center;
border-radius:4px 4px 0 0;
-moz-border-radius:4px 4px 0 0;
-webkit-border-radius:4px 4px 0 0;
}
#menu > li > a:hover,#menu > .active > a{
background:#fff;
background: url('../images/IMAGE_B.jpg');;
background-repeat:no-repeat;
border-color:#7DB112;
}
#menu > li > a span{
display:block;
position:relative;
color:#000;
font-family:Arial, Helvetica, sans-serif;
font-size:17px
}