문제

I can't figure out why this menu isn't working. The sub-menu or the ul li ul isn't displaying when I hover over the li yet when I resize to tablet/mobile width the menu works perfectly fine.

http://jsfiddle.net/cku6h/1/

<header id="site-header">
    <nav class="navbar cf inner">
        <ul>
            <li><a href="#">Home</a></li>
            <li><a href="#">Portfolio</a></li>
            <li>
                <a href="#">Blog</a>
                <ul>
                    <li>
                        <a href="#">Sub Link</a>
                    </li>
                    <li>
                        <a href="#">Sub Link</a>
                    </li>
                </ul>
            </li>
            <li><a href="#">Contact Me</a></li>
        </ul>
    </nav>
</header>
도움이 되었습니까?

해결책

You need to add this to your css:

.navbar ul li:hover ul {
      display: block;   
}

in order to make it display the drop-downs on hover.

See this updated fiddle: http://jsfiddle.net/pak2W/

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top