1

I'm having the hardest time trying to find the solution to this! I want my drop down tabs in my navigational menu at the top of my website to fly down, not just drop as soon as you hover. I want the drop down effect to be like this one: http://www.script-tutorials.com/demos/91/index.html

This is my CSS for my drop down menu currently:

nav ul ul {
    display: none;
    z-index: 9999
}

nav ul li:hover > ul {
    display: block;
}
nav ul {
    background: #efefef; 
    background: linear-gradient(top, #D8D8D8  10%, #D0D0D0 90%);  
    background: -moz-linear-gradient(top, #D8D8D8  10%, #D0D0D0 90%);
    background: -webkit-linear-gradient(top, #D8D8D8  10%, #D0D0D0 90%);
    box-shadow: 0px 0px 9px 0px rgba(0,0,0,0.15);
    padding: 0px 20px;
    border-radius: 10px;  
    list-style: none;
    position: relative;
    display: inline-table;
}
nav ul:after {
    content: ""; clear: both; display: block;
}
li {
    float: left;
}
nav ul li:hover {
    background: #4b545f;
    background: linear-gradient(top, #4f5964 0%, #5f6975 40%);
    background: -moz-linear-gradient(top, #4f5964 0%, #5f6975 40%);
    background: -webkit-linear-gradient(top, #4f5964 0%,#5f6975 40%);
}
    nav ul li:hover a {
        color: #fff;
    }

nav ul li a {
    display: block; padding: 10px 40px;
    color: #757575; text-decoration: none;
    font-family:arial;
}
nav ul ul {
    background: #5f6975; border-radius: 0px; padding: 0px;
    position: absolute; top: 100%;
}
nav ul ul li {
    float: none; 
    border-top: 1px solid #6b727c;
    border-bottom: 1px solid #575f6a;
}
    nav ul ul li a {
        padding: 10px 40px;
        color: #fff;
        font-family:arial; font-weight:900;
    }   
        nav ul ul li a:hover {
            background: #4b545f;
        }
nav ul ul ul {
    position: absolute; left: 100%; top:0;
}

This is the HTML for which I place inside of my webpages:

<center><nav>
<ul>
    <li><a href="/">Home</a></li>
    <li><a href="">Arcade</a>
        <ul>
            <li><a href="/arcade/action">Action</a></li>
            <li><a href="/arcade/arcade">Arcade</a></li>
            <li><a href="/arcade/puzzle">Puzzle</a></li>
            <li><a href="/arcade/vehicle">Vehicle</a></li>
            <li><a href="/arcade/violence">Violence</a></li>
            <li><a href="/arcade/defense">Defense</a></li>
            <li><a href="/arcade/rpg">RPG</a></li>
        </ul>
    </li>
    <li><a href="">Watch</a>
        <ul>
            <li><a href="/watch/tv">TV Shows</a></li>
            <li><a href="/watch/movies">Movies</a></li>
        </ul>
    </li>
    <li><a href="">Extras</a>
        <ul>
            <li><a href="/news">News</a></li>
            <li><a href="/updates">Updates</a></li>
        </ul>
    </li>
    <li><a href="/support">Support</a></li>
</ul>
</nav></center>

Any ideas on how I could achieve this?

My website is http://www.gameshank.com/

4

2 回答 2

0

查看您发布的示例网站的源代码 - 它使用 CSS 转换来实现该效果。

于 2013-09-05T02:35:21.057 回答
0
nav ul ul li {
float: left;
border-top: 1px solid #6b727c;
border-bottom: 1px solid #575f6a;
}
于 2013-08-26T15:18:35.710 回答