我无法让子菜单位于 tab2 父级的顶部。我的意思是,当我将鼠标悬停在 tab2 下方时,子菜单会出现。我使用自己制作的按钮(图片)。有人可以整理演示中的 CSS 代码吗?非常感谢 :) 这是演示http://jsfiddle.net/3Lhe7/
@charset "utf-8";
/* CSS Document */
body {
max-width: 1000px;
text-align: right;
/*text-align: center;*/
}
.bg {
width: 100%;
height: 100%;
position: fixed;
top: 0;
left: 0;
z-index: -5000;
}
#navigation {
clear: both;
width: 60%;
margin: 0 auto;
border: 0px;
text-align: left;
position: absolute;
top: 65%;
left: 20%;
height: 90px;
min-width:830px;
max-width:1000px;
}
#navigation ul {
display: inline-block;
margin: 0 auto;
}
#navigation ul li {
display: inline;
position: relative;
float: left;
list-style-type: none;
height: 45px;
}
#navigation li ul {
margin: 0px;
padding: 0px;
display: none;
position: absolute;
}
#navigation ul li a {
list-style: none;
display: block;
width: 150px;
height: 90px;
padding: 0px;
}
#navigation ul li ul {
display: none;
}
#navigation ul li:hover ul {
display: block;
bottom: 100%;
}
#submenu {
list-style: none;
display: block;
width: 150px;
height: 45px;
padding: 0px;
margin: 0px;
}