无法弄清楚我做错了什么......
http://tacticaloffense.com/indexNew.php
这是我的 HTML:
<div id="headerTopNav">
<ul id="topNav">
<li id="home"><a href="index.php" class="home">Home</a></li>
<li id="about"><a href="about.php" class="about">About</a></li>
<li id="products"><a href="shop/index.php" class="products">Products</a></li>
<li id="wpNews"><a href="news/index.php" class="wpNews">News</a></li>
<li id="contact"><a href="contact.php" class="contact">Contact</a></li>
</ul>
</div>
这是我的CSS:
#headerTopNav {
position:absolute;
top:11px;
left:520px;
height:30px;
}
#topNav {
height:30px;
padding:0;
margin:0;
display:inline;
}
#topNav li {
list-style:none;
display:inline;
}
#topNav li:after {
border-right:1px solid #063d04;
}
#topNav li:last-child {
border:none;
}
#topNav a {
background:url(../img/nav/nav_map.png);
display:inline-block;
height:30px;
text-indent:-9000px;
}
#topNav a.home,
#topNav a.about,
#topNav a.products,
#topNav a.wpNews,
#topNav a.contact {
height:30px;
}
#topNav li#home, #topNav a.home {
width:77px;
}
#topNav li#about, #topNav a.about {
width:102px;
}
#topNav li#products, #topNav a.products {
width:99px;
}
#topNav li#wpNews, #topNav a.wpNews {
width:72px;
}
#topNav li#contact, #topNav a.contact {
width:92px;
}
#topNav a.home:link, #topNav a.home:visited {
background:url(../img/nav/nav_map.png) no-repeat -246px 0px;
}
#topNav a.home:hover {
background:url(../img/nav/nav_map.png) no-repeat -246px -30px;
}
#topNav a.about:link, #topNav a.about:visited {
background:url(../img/nav/nav_map.png) no-repeat 0px 0px;
}
#topNav a.about:hover {
background:url(../img/nav/nav_map.png) no-repeat 0px -30px;
}
#topNav a.products:link, #topNav a.products:visited {
background:url(../img/nav/nav_map.png) no-repeat -570px 0px;
}
#topNav a.products:hover {
background:url(../img/nav/nav_map.png) no-repeat -570px -30px;
}
#topNav a.wpNews:link, #topNav a.wpNews:visited {
background:url(../img/nav/nav_map.png) no-repeat -447px -60px;
}
#topNav a.wpNews:hover {
background:url(../img/nav/nav_map.png) no-repeat -447px -90px;
}
#topNav a.contact:link, #topNav a.contact:visited {
background:url(../img/nav/nav_map.png) no-repeat -140px -60px;
}
#topNav a.contact:hover {
background:url(../img/nav/nav_map.png) no-repeat -140px -90px;
}
有人能帮忙吗?我正在尝试使用图像做一个水平导航菜单,以便您在每个链接上看到一个图像,当您将鼠标悬停在每个链接上时会看到一个不同的图像。一共10张图片。