三级导航栏有点问题,麻烦各位大佬看一下

<!doctype html>
<html>
<head>
    <meta charset="UTF-8">
    <title>三级导航栏</title>
    <style type="text/css">
    *{
        padding:0;
        margin:0;
    }
    ul li
    {
        list-style:none;
    }
    ul li a
    {     
        display: block;
        width:100px;
        height:30px;
        background-color: #ccc;
        border:1px solid black;
        line-height: 30px;
        text-align: center;
        text-decoration: none;
    }
    #list ul li
    {
        position: relative;
    }
    #list ul li ul
    {
        position: absolute;
        top:0px;
        left:100px;
    }
    #list ul li ul li ul
    {
        position: absolute;
        top:0px;
        left:100px;
    }
    #list ul li ul
    {
        display:none;
    }
    #list ul li ul li ul
    {
        display:none;
    }
    #list ul li:hover ul.list1
    {
        display:block;
    }
    #list ul li ul li:hover ul
    {
        display:block;
    }
    </style>
</head>
<body>
    <div id="list">
        <ul>
            <li><a href="#">一级菜单</a>
                <ul>
                    <li><a href="#">二级菜单</a>
                        <ul>
                            <li><a href="#">三级菜单</a></li>
                            <li><a href="#">三级菜单</a></li>
                            <li><a href="#">三级菜单</a></li>
                        </ul>
                    </li>
                    <li><a href="#">二级菜单</a>
                        <ul>
                            <li><a href="#">三级菜单</a></li>
                            <li><a href="#">三级菜单</a></li>
                        </ul>
                    </li>
                </ul>
            </li>
            <li><a href="#">一级菜单</a>
                <ul>
                    <li><a href="#">二级菜单</a>
                        <ul>
                            <li><a href="#">三级菜单</a></li>
                        </ul>
                    </li>
                    <li><a href="#">二级菜单</a>
                        <ul>
                            <li><a href="#">三级菜单</a></li>
                        </ul>
                    </li>
                </ul>
            </li>
            <li><a href="#">一级菜单</a></li>
            <li><a href="#">一级菜单</a></li>
            <li><a href="#">一级菜单</a></li>
        </ul>
    </div>
</body>
</html>


黑白琴键弹不出的回忆0
浏览 1016回答 1
1回答

ziom

没有伪类选择器,也没有js代码,那你要怎么实现子级菜单的显示隐藏
打开App,查看更多内容
随时随地看视频慕课网APP