三级目录不能隐藏
已经实现的效果,二级目录可以隐藏,但是三级目录不能隐藏,请高手帮忙看看,谢谢!
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
<style type="text/css">
.page{
width:100%;
height:2000px;
}
*{
padding: 0;
margin: 0;
font-family: "microsoft yahei";
}
.nav{
width: 160px;
height: auto;
background: #666;
position: fixed;
top: 50%;
left:0;
color:#fff;
line-height: 40px;
text-align: center;
margin-top: -82px;
cursor: pointer;
}
.nav_1{
border-bottom: 1px solid #fff;
}
.nav_1_content>div{
height:auto;
width: 160px;
border-bottom: 1px dashed #fff;
background: #666;
}
.nav_1:hover div{
display: block;
}
.nav_1_content{
color:red;
display: none;
position: absolute;
left:160px;
top:0;
}
.nav_3title{
width: 160px;
height: auto;
background: #666;
display: none;
color:violet;
position: absolute;
left:160px;
top:0;
}
.nav_3{
border-bottom: 1px solid #fff;
}
</style>
</head>
<body>
<div class="page">
<div class="nav">
<div class="nav_1">
<div class="nav_1_title">一级目录</div>
<div class="nav_1_content">
<div class="nav_2">二级目录
<div class="nav_3title">
<div class="nav_3">三级目录</div>
<div class="nav_3">三级目录</div>
<div class="nav_3">三级目录</div>
</div>
</div>
<div class="nav_2">二级目录</div>
</div>
</div>
</div>
</div>
</body>
</html>