CSS菜单隐藏在Adobe Dreamweaver中Nivo Slider的导航器后面。我试着为菜单第一级使用相对位置,为第二级菜单添加绝对位置,但对我不起作用。

NIVO滑块:
.theme-orman .nivo-controlNav-bg {
position:absolute;
left: 0;
bottom: -15px;
width: 960px;
height: 44px;
z-index: 100;
background: url(../images/slider_nav_bg.png) no-repeat
}
.theme-orman .nivo-controlNav {
position:absolute;
left: 472px;
bottom: 4px;
margin-left:-30px; /* Tweak this to center bullets */
z-index: 101;
}
.theme-orman .nivo-controlNav a {
display:block;
width:12px;
height:12px;
background:url(../images/slider_nav_button.png) no-repeat;
text-indent:-9999px;
border:0;
margin-right:7px;
float:left;
}CSS菜单:
.ddsmoothmenu{
}
.ddsmoothmenu ul{
z-index:100;
margin: 0;
padding: 0;
list-style-type: none;
}
/*Top level list items*/
.ddsmoothmenu ul li{
position: relative;
display: inline;
float: left;
}
/*Top level menu link items style*/
.ddsmoothmenu ul li a {
display: block;
height: 46px;
width: 106px;
margin-right: 5px;
line-height: 35px;
padding-top: 10px;
font-size: 13px;
color: #FCFCC7;
text-align: center;
text-decoration: none;
font-weight: 400;
outline: none;
background: url(../images/templatemo_menu_item.jpg)
}
* html .ddsmoothmenu ul li a{ /*IE6 hack to get sub menu links to behave correctly*/
display: inline-block;
}
.ddsmoothmenu ul li a.selected, .ddsmoothmenu ul li a:hover { /*CSS class that's dynamically added to the currently active menu items' LI A element*/
color: #EB1765;
background: url(../images/templatemo_menu_hover2.png) no-repeat
}
/*1st sub level menu*/
.ddsmoothmenu ul li ul {
position: absolute;
width: 184px;
margin: 0 0 0 3px;
display: none; /*collapse all sub menus to begin with*/
visibility: hidden;
background: #F0E11A
}
/*Sub level menu list items (undo style from Top level List Items)*/
.ddsmoothmenu ul li ul li{
display: list-item;
float: none;
}
/*All subsequent sub menu levels vertical offset after 1st level sub menu */
.ddsmoothmenu ul li ul li ul{
top: 0;
}
/* Sub level menu links style */
.ddsmoothmenu ul li ul li a{
font-weight: 500;
width: 140px; /*width of sub menus*/
margin: 0 3px 0 1px;
height: 28px;
line-height: 28px;
padding: 5px 22px;
font-size: 11px;
text-align: left;
background: none;
color: #161AF7;
border-bottom: 1px solid #bab5b0
}
.ddsmoothmenu ul li ul li .last {
border-bottom: none;
}
.ddsmoothmenu ul li ul li a.selected, .ddsmoothmenu ul li ul li a:hover {
color: #EDEA15;
width: 139px;
padding-left: 25px;
background: #CF178E;
}
/* Holly Hack for IE \*/
* html .ddsmoothmenu{height: 1%;} /*Holly Hack for IE7 and below*/
/* ######### CSS classes applied to down and right arrow images ######### */
.downarrowclass{
position: absolute;
top: 12px;
right: 7px;
}
.rightarrowclass{
position: absolute;
top: 6px;
right: 5px;
}
/* ######### CSS for shadow added to sub menus ######### */
.ddshadow{
position: absolute;
: 0;
top: 0;
width: 0;
height: 0;
}
.toplevelshadow{ /*shadow opacity. Doesn't work in IE*/
opacity: 0.5;
}
/* menu */发布于 2016-02-14 08:19:24
.ddsmoothmenu ul{
position: relative; /* add a position */
z-index:102; /* changed from 100 */
margin: 0;
padding: 0;
list-style-type: none;
}z-index是屏幕上的级别。点有100个,菜单有100个。所以它将被画在点的后面。因此,您只需更改级别。
https://stackoverflow.com/questions/35385364
复制相似问题