设置动态菜单栏的重点在于 hover的使用上,
ul:hover{} // ul会显示出想要的效果,而并非所以父子元素都实现。
<style type="text/css">
ul{
padding:0;margin: 0;}
#nav {
line-height: 30px;list-style-type: none;}
#nav li {
float: left;width:150px;text-align: center; background: #AAAAAA}
#nav li ul {
line-height: 27px; list-style-type: none;list-style-position:inherit; text-align:left;left:-100em; width: 50px; position: absolute;}
#nav li ul li{
float: left;width: 150px ;text-align: center; background: