也许新鲜的眼睛可以看到我哪里出了问题,但我希望活动菜单项具有不同的风格......
HTML:
<div id="menu">
<ul>
<li id="active"><a href="#">Home</a></li>
<li><a href="#">Products</a></li>
<li><a href="#">Services</a></li>
<li><a href="#">About</a></li>
<li><a href="#">Contact</a></li>
</ul>
</div>
还有我的 CSS:
#menu ul {list-style-type: none;height: 40px;float: left;margin-top: 43px;margin-left:-32px;}
#menu li {
float: left;
}
#menu li #active {
background: url(../images/menu-bg-hover.png) no-repeat;
color: #ffffff;
}
#menu li a {
background: url(../images/menu-bg.png) no-repeat;
display: block;
width: 100px;
height: 40px;
text-decoration: none;
font-size: 16px;
color: white;
margin: 0 auto;
text-align: center;
padding-top: 10px;
color:#424242;
font-family: "Helvetica", Arial, sans-serif;
}