你好新手问题,我只想将li.about悬停在ul.second上..有人可以帮我解决这个问题..
<ul id="nav" class="clear">
<li id="home"><a href="index.html"></a></li>
<li id="about"><a href="about.html"></a></li>
<ul class="second">
<li><a href="www.yahoo.com">1st Link</li>
<li><a href="www.google.com">2nd Link</li>
<li><a href="www.google.com">2nd Link</li>
</ul>
<li id="gallery"><a href="gallery.html"></a></li>
<li id="before-after"><a href="before-after.html"></a></li>
<li id="loft"><a href="loft-conversations.html"></a></li>
<li id="case"><a href="case-studies.html"></a></li>
<li id="testimonials"><a href="testimonials.html"></a></li>
<li id="faqs"><a href="faqs.html"></a></li>
<li id="contact"><a href="contact.html"></a></li>
</ul>
css代码
#navigation ul#nav li#about:hover ul.second
{
background:#CCC;
padding:1px;
margin:1px;
height:200px;
color:black;
z-index:1000;
width:200px;
}
答案 0 :(得分:0)
如果您要执行的是下拉菜单,请使用display: none;
和display: block
css属性。