CSS中如何将Hover应用于多个<a>标签?我将两个<a>放在<ul><li>里,但只对一个<a>有效。
<divid="top"><ul><li><ahref="#">Login</a></li><li><ahref="#">Signup</a></li></ul></di...
<div id="top">
<ul>
<li><a href="#">Login</a></li>
<li><a href="#">Sign up</a></li>
</ul>
</div>
#top{
height: 18px;
background:url(images/night_bg.jpg);
}
#top ul{
height: 18px;
padding: 0 1px;
margin: 0 5px;
}
#top ul li{
float: left;
width:auto;
height: 18px;
margin: 0 5px;
overflow:hidden;
display:block;
}
#top ul li a{
display: block;
color: #7c7c7c;
text-shadow: 1px 1px 0 #101010;
font-family:Georgia, "Times New Roman", Times, serif;
font-size:10px;
line-height:12px;
padding: 2px 1px 6px 7px;
text-decoration: none;
float:left;
}
#top ul li a:hover{
color:#ededed;
text-decoration: none;
} 展开
<ul>
<li><a href="#">Login</a></li>
<li><a href="#">Sign up</a></li>
</ul>
</div>
#top{
height: 18px;
background:url(images/night_bg.jpg);
}
#top ul{
height: 18px;
padding: 0 1px;
margin: 0 5px;
}
#top ul li{
float: left;
width:auto;
height: 18px;
margin: 0 5px;
overflow:hidden;
display:block;
}
#top ul li a{
display: block;
color: #7c7c7c;
text-shadow: 1px 1px 0 #101010;
font-family:Georgia, "Times New Roman", Times, serif;
font-size:10px;
line-height:12px;
padding: 2px 1px 6px 7px;
text-decoration: none;
float:left;
}
#top ul li a:hover{
color:#ededed;
text-decoration: none;
} 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询