代码:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>071-071</title>
</head>
<body>
<style>
*{
padding: 0;
margin: 0;
}
.box{
width: 300px;
margin: 0 auto;
}
ul{
list-style: none;
}
li{
float: left;
width: 148px;
text-align: center;
border: 1px solid red;
background-color: aqua;
color: aliceblue;
line-height: 40px;
}
.cs23:hover{
background-color: aquamarine;
}
.cs1{
background-color: aliceblue;
display: none;
}
.cs23:hover .cs1{
display: block;
}
</style>
<ul class="box">
<li class="cs23">111
<ul class="cs1">
<li>222</li>
<li>333</li>
<li>444</li>
</ul>
</li>
<li class="cs23">aaa
<ul class="cs1">
<li>bbb</li>
<li>ccc</li>
<li>ddd</li>
</ul>
</li>
</ul>
</body>
</html>