我正在努力让我的网站启动并运行,而且我在Firefox中的下拉导航菜单中遇到了问题。
我一直在Chrome中使用该网站,它运行正常,它是一个简单的嵌套列表设置选择。选项显示,但它们浮动到左侧而不是直接位于相应部分的下方。
CSS:
/*sub-menu navigation*/
nav.primary ul ul
{
opacity: 0;
filter: alpha(opacity=0);
position: absolute;
z-index: 999;
background: #111111;
height: 0px;
overflow: hidden;
min-width: 100%;
-webkit-transition: opacity 0.4s ease-out;
-moz-transition: opacity 0.4s ease-out;
-o-transition: opacity 0.4s ease-out;
-ms-transition: opacity 0.4s ease-out;
transition: opacity 0.4s ease-out;
-webkit-box-shadow: 0px 2px 2px rgba(0,0,0,0.3);
-moz-box-shadow: 0px 2px 2px rgba(0,0,0,0.3);
box-shadow: 0px 2px 2px rgba(0,0,0,0.3);
}
nav.primary ul li:hover ul
{
opacity: 10;
filter: alpha(opacity=100);
height: auto;
overflow: auto;
}
nav.primary ul ul li
{
float: none;
display: list-item;
border-bottom: 1px solid #747474;
}
nav.primary ul ul li a
{
display: block;
margin-left: 10px;
line-height: 40px;
font-size: 0.8em;
/*text-transform: none;*/
font-family: 'LibbyRegular', Helvetica, Arial, sans-serif;
}
菜单HTML
<ul>
<li><a href="portfolio.html#individual" title="individual">independent work</a>
<ul>
<li><a href="bigAndUgly.html">>> big and ugly</a></li>
<li><a href="iceworld.html">>> iceworld</a></li>
<li><a href="gordonsGotGame.html">>> gordon's got game</a></li>
</ul>
</li>
<li><a href="portfolio.html#team" title="team">team projects</a>
<ul>
<li><a href="blastrobots.html">>> blastrobots</a></li>
<li><a href="#">>> ruined</a></li>
</ul>
</li>
<li><a href="portfolio.html#scripting" title="scripting">scripting</a>
<ul>
<li><a href="#">>> hero man (C#)</a></li>
<li><a href="#">>> CloneOut (lua)</a></li>
<li><a href="#">>> shotgun (unrealscript)</a></li>
</ul>
</li>
<li><a href="resume.html" title="resume">resume</a></li>
</ul>
如果您想测试该网站,则该网站为http://lvsherman.com。
答案 0 :(得分:2)
尝试添加内部UL元素。
left: 0;
top: WHATEVER;