简体   繁体   English

无法从菜单悬停第二个UL

[英]Can't hover 2nd ul from menu

I don't know where I have mistaken, I can't hover 2nd ul for the menu, where is solutions arrow down button, it doesn't stay active, when I hover it. 我不知道自己在哪里弄错了,我无法将2nd ul悬停在菜单上,解决方案向下箭头按钮在哪里,当我将其悬停时,它不会保持活动状态。 I added mobile_menu class to separate it from other menus, and I can't find where I should put #mobile_menu to get it to work 我添加了mobile_menu类以将其与其他菜单分开,但我找不到应该放在#mobile_menu使其起作用的位置。

Here is fiddle 这是小提琴

HTML HTML

<div id="mobile_menu">
        <label for="show-menu" class="show-menu lines"></label>
        <input type="checkbox" id="show-menu" role="button">
        <ul id="menu">
            <li><a href="#">Features</a></li>
            <li>
                <a href="#">Solutions ↓</a>
                <ul class="hidden">
                    <li><a href="#">Who We Are</a></li>
                    <li><a href="#">What We Do</a></li>
                </ul>
            </li>
            <li>
                <a href="#">Pricing ↓</a>
                <ul class="hidden">
                    <li><a href="#">Photography</a></li>
                    <li><a href="#">Web & User Interface Design</a></li>
                    <li><a href="#">Illustration</a></li>
                </ul>
            </li>
            <li><a href="#">Resources</a></li>
            <li>
                <a href="#">About ↓</a>
                <ul class="hidden">
                    <li><a href="#">Contact Us</a></li>
                    <li><a href="#">Company</a></li>
                    <li><a href="#">Carrers</a></li> 
                </ul>
             </li>
        </ul>
    </div>

You just have to stabilize the hidden div when its visible and being hover ed. 您只需要在hidden div可见并被hover稳定它。

I have updated your fiddle 我已经更新了你的小提琴

/*Display the dropdown on hover*/
#mobile_menu ul li:hover > .hidden{
    display: block; /* make div display on hover*/
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM