看起来像一个 z-index 问题,个人我总是将菜单放在绝对值上,并在 z-index 中给它们一些'9',尝试检查你是否有任何接近这个菜单的绝对位置无论如何这是我的旧 css 菜单:
<div id="menu">
<ul id="mainm">
<li class="clas">Home<ul><li class="cc">Header 1</li><li class="dd">Header 2</li><li class="cc">Header 3</li><li class="dd">Header 4</li><li class="cc">Header 5</li>
<li id="bottomend" class="dd">Header 6</li></ul></li>
<li class="clas">About<ul><li class="cc">Header 1</li><li class="dd">Header 2</li><li class="cc">Header 3</li><li class="dd">Header 4</li><li class="cc">Header 5</li><li id="bottomend" class="dd">Header 6</li></ul></li>
<li class="clas">FAQ<ul><li class="cc">Header 1</li><li class="dd">Header 2</li><li class="cc">Header 3</li><li class="dd">Header 4</li><li class="cc">Header 5</li><li id="bottomend" class="dd">Header 6</li></ul></li>
<li class="clas">Site Design's<ul><li class="cc">Header 1</li><li class="dd">Header 2</li><li class="cc">Header 3</li><li class="dd">Header 4</li><li class="cc">Header 5</li><li id="bottomend" class="dd">Header 6</li></ul></li>
<li class="clas" id="boright">Sign Up !<ul><li class="cc">Header 1</li><li class="dd">Header 2</li><li class="cc">Header 3</li><li class="dd">Header 4</li><li class="cc">Header 5</li><li id="bottomend" class="dd">Header 6</li></ul></li>
</ul>
</div>
风格 :
@font-face {
font-family: 'Finger Paint', cursive;
font-family: 'Mr Dafoe', cursive;
font-family: 'Fjalla One', sans-serif;
}
body { font-family:'Fjalla One'; color:#fff}
#mainm{list-style-type:none; text-align: center;}
.clas ul { list-style-type:none; padding:0px;display:none; background-color:#903; }
.clas { float:left; width:90px; background-color:#2872DF; border:0px; height:30px; font-family:'Fjalla One'; font-weight:300; line-height:30px;
border-left:1px solid #7C99E4;
background: rgb(59,103,158); /* Old browsers */
background: -moz-linear-gradient(top, rgba(59,103,158,1) 0%, rgba(43,136,217,1) 50%, rgba(32,124,202,1) 51%, rgba(125,185,232,1) 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(59,103,158,1)), color-stop(50%,rgba(43,136,217,1)), color-stop(51%,rgba(32,124,202,1)), color-stop(100%,rgba(125,185,232,1))); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, rgba(59,103,158,1) 0%,rgba(43,136,217,1) 50%,rgba(32,124,202,1) 51%,rgba(125,185,232,1) 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, rgba(59,103,158,1) 0%,rgba(43,136,217,1) 50%,rgba(32,124,202,1) 51%,rgba(125,185,232,1) 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top, rgba(59,103,158,1) 0%,rgba(43,136,217,1) 50%,rgba(32,124,202,1) 51%,rgba(125,185,232,1) 100%); /* IE10+ */
background: linear-gradient(to bottom, rgba(59,103,158,1) 0%,rgba(43,136,217,1) 50%,rgba(32,124,202,1) 51%,rgba(125,185,232,1) 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#3b679e', endColorstr='#7db9e8',GradientType=0 ); /* IE6-9 */
}
#boright {border-right:1px solid #7C99E4;}
.main:hover {background-color:#78A3F1;}
.clas:hover {background-color:#78A3F1;
background: rgb(126,204,234); /* Old browsers */
background: -moz-linear-gradient(top, rgba(126,204,234,1) 0%, rgba(11,176,226,1) 50%, rgba(121,206,234,1) 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(126,204,234,1)), color-stop(50%,rgba(11,176,226,1)), color-stop(100%,rgba(121,206,234,1))); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, rgba(126,204,234,1) 0%,rgba(11,176,226,1) 50%,rgba(121,206,234,1) 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, rgba(126,204,234,1) 0%,rgba(11,176,226,1) 50%,rgba(121,206,234,1) 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top, rgba(126,204,234,1) 0%,rgba(11,176,226,1) 50%,rgba(121,206,234,1) 100%); /* IE10+ */
background: linear-gradient(to bottom, rgba(126,204,234,1) 0%,rgba(11,176,226,1) 50%,rgba(121,206,234,1) 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#7eccea', endColorstr='#79ceea',GradientType=0 ); /* IE6-9 */
}
.clas:hover ul { display:block; border:0px solid black; width:120px; height:180px; line-height:30px; padding:0px 0px 0px 0px; background-color:#78A3F1; margin-top:0px;}
.imgfl {float:right; top: 70px; box-shadow:5px 5px 5px #003; margin-right:70px;}
li ul li.cc {background-color:#78A3F1; width:150px; text-align:center; border-bottom: 3px #7C99E4 solid;}
li ul li.dd {background-color:#5582D5; width:150px; text-align:center; border-bottom: 3px #7C99E4 solid;}
li ul .cc:hover , .dd:hover {background-color:#F96;}
#bottomend { border-bottom:1px solid #000;}
#border { position:absolute; border:2px solid #FFF; width:200px; height:200px; z-index:20;}
#clas:hover ul{
display:block;
border:0px solid black;
width:300px; height:150px;
line-height:30px;
padding:00px 0px 0px 00px;
background-color:#78A3F1;
margin-top:0px;
}
#menu {
height:30px;
box-shadow:5px 1px 5px #666;
width:700px;
padding:0px 160px;
background: rgb(59,103,158); /* Old browsers */
background: -moz-linear-gradient(top, rgba(59,103,158,1) 0%, rgba(43,136,217,1) 50%, rgba(32,124,202,1) 51%, rgba(125,185,232,1) 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(59,103,158,1)), color-stop(50%,rgba(43,136,217,1)), color-stop(51%,rgba(32,124,202,1)), color-stop(100%,rgba(125,185,232,1))); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, rgba(59,103,158,1) 0%,rgba(43,136,217,1) 50%,rgba(32,124,202,1) 51%,rgba(125,185,232,1) 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, rgba(59,103,158,1) 0%,rgba(43,136,217,1) 50%,rgba(32,124,202,1) 51%,rgba(125,185,232,1) 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top, rgba(59,103,158,1) 0%,rgba(43,136,217,1) 50%,rgba(32,124,202,1) 51%,rgba(125,185,232,1) 100%); /* IE10+ */
background: linear-gradient(to bottom, rgba(59,103,158,1) 0%,rgba(43,136,217,1) 50%,rgba(32,124,202,1) 51%,rgba(125,185,232,1) 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#3b679e', endColorstr='#7db9e8',GradientType=0 ); /* IE6-9 */
}