1

我正在努力让我的网站启动并运行,但我在 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 。

4

1 回答 1

2

尝试添加到您的内部 UL 元素。

left: 0;
top: WHATEVER;
于 2013-01-31T16:14:37.223 回答