我正在尝试在li a上使用2个不同的背景:将鼠标悬停在水平菜单中。它似乎在FF和Chrome中工作,但在IE上不起作用。 这是使用css
的水平菜单的CSS#layTopMenu
{
position: relative;
width: 970px;
height: 52px;
padding-top: 1px;
margin: 0 auto;
z-index: 5;
}
#layTopMenu ul
{
position: relative;
list-style: none;
margin: 0;
padding: 0;
}
#layTopMenu ul li
{
position: relative;
float: left;
margin: 0;
padding: 0 1px;
background: transparent url(../images/divider.gif) right no-repeat;
}
#layTopMenu ul li a {
color: #fff;
position: relative;
display: inline-block;
text-decoration: none;
margin: 0;
padding: 0 20px;
text-transform: uppercase;
text-align:center;
height: 49px;
line-height: 49px;
}
#layTopMenu ul li a:hover
{
color: #fff;
background:url(../images/nav_dot.gif) no-repeat center, url(../images/tab_hover_bg.gif) repeat-x;
text-align:center;
text-decoration: none;
}