<!DOCTYPE html>
<html>
<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>Demon</title>
<style type="text/css">
*{
margin: 0;
padding: 0;
}
.nav{
width: 30%;
height: 30px;
font-family: "微软雅黑";
font-weight: bold;
font-size: 15px;
margin: 0 auto;
background-color: gray;
position: relative;
} .ul li{
list-style-type: none;
line-height: 30px;
width: 100px;
/*height: auto; */
/* display: block; */
text-align: center;
} .ul{
display: flex;
justify-content: space-around;
} .ul li a{
text-decoration: none;
color: black;
display: block;
padding: 0,30px;
} ul li a:hover{
color: white;
background-color: blue;
} ul li ul li{
margin: 2px 0 0 0;
background-color: gray;
text-align: center;
display: none;
} ul li :hover ul li{
display: block;
} .asd{
position: absolute;
top: 40;
left: 0;
} .asd li{
width:100px;
}
</style>
</head>
<body>
<div class="nav">
<ul class="ul">
<li><a href="#">第一条</a>
<ul class="asd">
<li><a href="#">1.1条12</a></li>
<li><a href="#">1.2条222222</a></li>
<li><a href="#">1.3条</a></li>
<li><a href="#">1.4条</a></li>
</ul>
</li>
<li><a href="#">第二条</a></li>
<li><a href="#">第三条</a>
<ul>
<li><a href="#">3.1条</a></li>
<li><a href="#">3.2条</a></li>
<li><a href="#">3.3条</a></li>
<li><a href="#">3.4条</a></li>
</ul>
</li>
<li><a href="#">第四条</a></li>
</ul>
</div>
</body>
</html>