跳转到主要内容
long552900806 提交于 19 December 2012

我从drupal官网上下了danland主题,但是它的导航菜单不是下拉的,我向把它改成下拉样式,但不见成果,还请大侠指点。下面是我改得css menu部分的代码:\

#menu { height: 35px; background:url(images/menu-bg.gif) repeat-x; width:1152px; margin: 0 auto; } #nav { list-style-type: none; height: 35px; background:url(images/menu-bg.gif) repeat-x; float:left; } #nav li { float:left; background:url(images/menu-separator.gif) no-repeat right top; height:35px; padding:0 1px 0 0; } #nav li a{ color:#fff; text-decoration:none; font-size:12px; padding:7px 29px 0 29px; display:block; font-weight:bold; height:25px; } #nav li a:hover { color: red; background:transparent url(images/menu-hover-bg.gif) repeat-x; } #nav li ul{     line-height: 35px;     list-style-type: none;     left:-999em;     position: absolute;     *background:url(images/menu-bg.gif) repeat-x;     } #nav li ul li{     float:left;     width: 50px;     padding:0 1px 0 0; } #nav li ul a{ color:#fff; text-decoration:none; font-size:12px; padding:7px 29px 0 29px; display:block; font-weight:bold; height:25px; width: 50px; } #nav li ul a:hover {     color: red; } #nav li:hover ul{     left: auto;} #nav li.sfhover ul{     clear: left;}      #rounded-menu-left { height: 35px; background:transparent url(images/menu-left-bg.gif) no-repeat; float:left; width:1px; line-height:0; font-size:0; } #rounded-menu-right { height: 35px; background:url(images/menu-right-bg.gif) no-repeat; float:right; width:14px; line-height:0; font-size:0; } #nav ul, #nav ul li.leaf { list-style-image:none; list-style:none; } #nav ul, #nav .block ul, #nav ol { margin:0; padding:0; }