我的菜单悬停链接有问题。我有一个菜单 HTML:
<div class="menu">
<ul id="nav">
<li><div><a href="#">HOME</a> <div class="hover"></div></div></li>
<li><div><a href="#">ABOUT</a><div class="hover"></div></div></li>
<li><div><a href="#">PORTFOLIO</a><div class="hover"></div></div></li>
<li><div><a href="#">SERVICE</a><div class="hover"></div></div></li>
<li><div><a href="#">BLOG</a><div class="hover"></div></div></li>
<li><div><a href="#">CONTACT</a><div class="hover"></div></div></li>
</ul>
</div>
CSS:
.menu {
width: 950px;
height: 50px;
float: right;
font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
font-weight: bold;
font-size: 12px;
margin-top: 80px;
border: 1px #FFF solid;
}
.menu #nav {
list-style: none;
}
.menu #nav li {
display: inline-block;
padding: 0px 30px 0px 30px;
}
.menu #nav li a {
font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
font-weight: bold;
font-size: 12px;
color: #FFF;
text-decoration: none;
}
.menu #nav li a:hover {
font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
font-weight: bold;
font-size: 12px;
color: #FFF;
text-decoration: none;
color: #ca6666;
}
.menu #nav li a .hover {
display:none;
}
.menu li a:hover + .hover {
background-image:url(images/hover.png);
background-position:center;
width: 96px;
height: 33px;
color: #ca6666;
font-weight: bold;
display: block;
margin-top: -20px;
}
.clear {
clear: both;
}
我想让我的链接独立于其他人。例如现在,当我将鼠标悬停在链接上时,我的菜单会展开并且看起来不太好。当我悬停菜单不展开时,我想让我的悬停链接独立于其他链接。我怎样才能做到这一点?