為什么我的二級菜單不顯示呢?
為什么我做的二級菜單不顯示呢?
CSS{#daohang
{?
? ? ?width:66%;?
margin:auto;
height:35px; margin-top:-15px;?
background:rgba(184,182,182,1.00);
}
.ul_d
{?
? ? list-style:none;
}
.ul_d li
{ ?
? ? ? float:left;?
?width:80px;
?text-align:center;
?border-right:1px solid rgba(249,247,247,1.00);
?height:35px; position:relative;
}
.ul_d li a
{?
? ? ?text-decoration:none;
color:rgba(0,0,0,1.00);
font-size:18px;?
display:block;?
padding:7px 0px;
}
.ul_d a:hover
{
color:blue; ?
background:#F4F4F4;
font-weight:700;
}
.ul_d li ul li{?
? ? ? float:none;?
? ? ? border-right:none;?
?background:#C8C8C8; ?
?height:25px;
?margin-top:px;
}
.ul_d li ul{?
? ? ? position:absolute;?
? ? ? left:-40px;?
? ? ? top:40px; ?display:none;
}
.ul_d li ul li a:hover{?
color:#000000; background:#0200FF;
}
.ul_d li: hover ul{ display:block;}
}
HTML{
<div id="daohang">
? ? ? ?<ul class="ul_d">
? ? ? ? ?<li><a href="index.html">首頁</a>
? ? ? ? ? ? ? <ul>
? ? ? ? ? ? ? ? ? <li><a href="#">關(guān)于我們</a></li>
? ? ? ? ? ? ? ? ? <li><a href="#">團隊介紹</a></li>
? ? ? ? ? ? ? ? ? <li><a href="#">成長故事</a></li>
? ? ? ? ? ? ? </ul>
? ? ? ? ? ?</li>
}
2016-04-05
.ul_d li: hover ul{ display:block;}?? 把:和hover之間的那個空格去掉
2015-11-25
可能是ul li :hover ul 這句代碼你漏寫了ul
2015-10-05
最后一步怎么寫都不行呢