我正在尝试向 css 添加一个菜单,但它的工作图像正在退回到 div。我认为一些css问题,尝试了很多但不起作用,甚至z-index也没有效果,我也尝试附上一张图片但声誉问题,图片解释了很多。无论如何,这个问题可能听起来很简单,但不知道为什么它不起作用,M 使用 firefox 19。
的CSS
ul.gelbuttonmenu{
position:relative;
padding: 0;
margin: 0;
margin-bottom:1em;
text-align: center; /*set value to "left", "center", or "right"*/
}
ul.gelbuttonmenu li{
display: inline;
z-index:10;
}
ul.gelbuttonmenu li a{
color: black;
font-weight:bold;
padding: 10px; /*make sure padding is sufficient that the height of the link is enough to fully show the gel button*/
margin-right: 20px; /*spacing between each menu link*/
text-decoration: none;
z-index:10;
}
ul.gelbuttonmenu li.active{ /*style of LI that gets dynamically added to menu to create background effect*/
position:absolute;
width:0;
background:lightblue;
z-index:10;
background:url(gelbuttonleft.gif) top left no-repeat, url(gelbuttonright.gif) top right no-repeat, url(gelbuttoncenter.gif) top center repeat-x;
}
body{}
.head{height:50px}
.foot{height:90px}
.wrap{width:80%;margin-left: 10%;background-color: #74e0ea;
text-align: center;
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
-webkit-box-shadow: #666 0px 2px 50px;
-moz-box-shadow: #666 0px 2px 50px;
box-shadow: #666 0px 2px 50px;
background: #74E0EA;
background: -webkit-gradient(linear, 0 0, 0 bottom, from(#74E0EA), to(#CCF1F5));
background: -webkit-linear-gradient(#74E0EA, #CCF1F5);
background: -moz-linear-gradient(#74E0EA, #CCF1F5);
background: -ms-linear-gradient(#74E0EA, #CCF1F5);
background: -o-linear-gradient(#74E0EA, #CCF1F5);
background: linear-gradient(#74E0EA, #CCF1F5);
}
的HTML
</div>
<div id="wrapper" class="wrap">
<div id="menu">
<ul id="gooeymenu1" class="gelbuttonmenu">
<li><a href="#">Home</a></li>
<li><a href="#">CSS Codes</a></li>
<li><a href="#">Forums</a></li>
<li><a href="#">Tools</a></li>
<li><a href="#">JavaScript</a></li>
<li><a href="#">CSS Gallery</a></li>
</ul>
</div>
</div>
<div id="footer" class="foot">
</div>
谢谢并恭祝安康