html / css menu hitbox

时间:2015-07-06 05:05:28

标签: html css menu

我使用不同的互联网资源编写了一个代码,我遇到了一个问题,即菜单部分底部的每个对象无法进行交互,菜单会干掉下拉列表下方的所有内容。菜单的hitbox似乎包括下拉列表,即使它没有显示

body {
        padding: 0;
        margin: 0;
        font-family: Arial;
        font-size: 23px;
    }
    #nav {
        background-color:1a1a1a;
        opacity: 0.9;
    }
    #nav_wrapper {
        width: 960px;
        margin: 0 auto;
        text-align: right;
    }
    #nav ul {
        list-style-type: none;
        padding: 0;
        margin: 0;
        position: relative;
        min-width: 200px;
    }
    #nav ul li {
        display: inline-block;
    }
    #nav ul li:hover {
        background-color: #333;
    }
    #nav ul li a, visited {
        color: #CCC;
        display: block;
        padding: 15px;
        text-decoration: none;
    }
    #nav ul li:hover ul {
        display: block;
    }
    #nav ul ul {
        display: none;
        position: absolute;
        background-color: #333;
        border: 0px solid #222;
        border-top: 0;
        margin-left: -5px;
    }
    #nav ul ul li {
        display: block;
    }
    #nav ul ul li a:hover {
        color: #699;
    }
    .left-to-right {
        text-align: left;
    }
    <body  dir-"rtl"><div id="nav">
    
        <div id="nav_wrapper">
    <div>
            <ul <ul  dir="RTL">
    
                <li> <a href="#">תרמילים</a>
    
                    <ul class="left-to-right">
    <!--  <li class="backpacks" id="firstlight-20l"> <a href="/products/firstlight-20l"> FirstLight 20L</a> </li>
    
                            <li class="backpacks" id="firstlight-30l"> <a href="/products/firstlight-30l"> FirstLight 30L</a> </li>
    
                            <li class="backpacks" id="firstlight-40l"> <a href="/products/firstlight-40l"> FirstLight 40L</a> </li>-->
    
                            <li class="backpacks"> <a href="/products/rotation180-professional-Deluxe"> rotation180° Professional 38L Deluxe</a> </li>
    
                            <li class="backpacks"> <a href="/products/rotation180-horizon"> rotation180° Horizon 34L</a> </li>
    
                            <li class="backpacks"> <a href="/products/rotation180-panorama"> rotation180° Panorama 22L</a> </li>
    
    <!--                        <li class="backpacks" id="rotation180-travel-away"> <a href="/products/rotation180-travel-away"> rotation180° Travel Away 22L</a> </li>-->
    
                            <li class="backpacks" id="rotation180-trail"> <a href="/products/rotation180-trail"> rotation180° Trail 16L</a> </li>
    
                          </ul>
                </li>
                <li> <a href="#">תיקי מצלמות ספורט</a>
    
                    <ul class="left-to-right">
                        <li><a href="#">GP 1 kit case</a>
                        </li>
                        <li><a href="#">GP 2 kit case</a>
                        </li>
                    </ul>
                </li>
                <li> <a href="#">אביזרים</a>
    
                    <ul class="left-to-right">
                        <li><a href="#">r180º Panorama/Horizon Photo Insert</a>
                        </li>
    
                    </ul>
                </li>
    
            </ul>
    </div>
        </div>
    </div>
    </body>
    

帮助将不胜感激

编辑: 菜单正在运行,但是在他下面的所有内容都是下拉假装的地方

0 个答案:

没有答案