为了账号安全,请及时绑定邮箱和手机立即绑定

帮我看看我这个三级栏为什么不出现?


<!DOCTYPE html>

<html>

<head>

<meta charset="UTF-8">

<title>Document</title>

<style>

    *{

     margin: 0;

     padding: 0;

    }

    .page{

     width: 100%;

     height: 4043px;

     background: url("https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1550675751768&di=9c864fe99df038b9d377d382ab1dddd6&imgtype=0&src=http%3A%2F%2Fgss0.baidu.com%2F7Po3dSag_xI4khGko9WTAnF6hhy%2Fzhidao%2Fwh%3D450%2C600%2Fsign%3De01bcbb01430e924cff1943579384230%2F7c1ed21b0ef41bd54a7d3e4c5ada81cb39db3d58.jpg") center top no-repeat;

    }

    .nav{

     width: 160px;

     height: 205px;

     position: fixed;

     left: 0;

     top: 50%;

     margin-top: -103px;

     font-family: 'Miscrosoft YaHei';


    }

    .tit{

     width: 160px;

     height: 40px;

    }

    .nav-li{

     width: 160px;

     height: auto;

     border-bottom: 1px solid #FFF;

     background: #333;

     text-align: center;

     line-height: 40px;

     color: #FFF;

     font-size: 16px;

     cursor: pointer;

    }

    .nav-li:hover ul{  /*隐藏二级*/

     display: block; 

    }

    .nav-li ul{

     width: 160px;

     height: auto;

     background: #FFF;

     display: none;  /*隐藏二级*/

    }

    .nav-li ul li{

     width: 160px;

     height: 40px;

     border-bottom: 1px dashed #666; 

     color: #333;

     text-align: center;

     line-height: 40px;  /*行高*/

     position: relative;

    }

    .nav-li ul li:haver .list-3{

            display: block;

    }

    .list-3{

     width: 160px;

     height: auto;

     position: absolute; /*定位属性,三级在旁边展开*/

     left: 160px;

     top: 0px;

     display: none;

    }

    .list-3Dom{

     width: 160px;

     height: 40px;

     background: #444;

     border-bottom: 1px solid #FFF;

     text-align: center;

            line-height: 40px;

            color: #FFF;

    }

</style>

</head>

<body>

<div class="page">

<div class="nav">

<div class="nav-li">

<div class="tit">标题</div>

<ul>

<li>

二级栏目

<div class="list-3">

<div class="list-3Dom">三级</div>

<div class="list-3Dom">三级</div>

<div class="list-3Dom">三级</div>

</div>

</li>

<li>

二级栏目

</li>

<li>

二级栏目

</li>

</ul>

</div>

<div class="nav-li">标题标题</div>

        <div class="nav-li">标题标题</div>

        <div class="nav-li">标题标题</div>

</div>

</div>

</body>

</html>


正在回答

1 回答

 .nav-li ul li:haver .list-3{display:block    }你把hover写成了haver改一下就好了


1 回复 有任何疑惑可以回复我~

举报

0/150
提交
取消

帮我看看我这个三级栏为什么不出现?

我要回答 关注问题
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号