@charset="UTF-8";
*{
margin:;
padding:;
}
h3+div{
height:;
overflow: hidden;
transition: all 1s ease;
}
a{
text-decoration: none;
}
.se{
width: 200px;
float: left;
background: rgba(180,60,30,0.3);
margin-top:3px;
margin-left: 20px;
}
h3{
background: rgba(180,80,30,0.8);
padding: 5px 25px;
border-radius: 20px;
}
.se:hover h3+div {
height: 350px;
overflow: auto;
}
<!DOCTYPE html>
<html lang="zh-cn">
<head>
<meta charset="UTF-8">
<title>折叠导航栏</title>
<link rel="stylesheet" type="text/css" href="but.css">
</head>
<body>
<div class="se">
<h3><a href="">IT</a></h3>
<div><img src="../img/IT.png" alt=""></div>
</div>
<div class="se">
<h3><a href="">创投</a></h3>
<div><img src="../img/创投.png" alt=""></div>
</div>
<div class="se">
<h3><a href="">探索</a></h3>
<div><img src="../img/探索.png" alt=""></div>
</div>
</body>
</html>