2021-08-24
路漫漫其修远兮,吾将上下而求索。
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<style type="text/css">
*{
margin: 0;
padding: 0;
}
h3{
background-color: #ededed;
width: 150px;
font-size: 25px;
text-align: center;
border: 1px #e4e4e4 solid;
}
li{
width: 150px;
text-align: center;
padding: 3px;
}
ul{
display: none;
}
.div1:hover .elec{
display: block;
}
.div2:hover .wash{
display: block;
}
.div3:hover .clothes{
display: block;
}
</style>
</head>
<body>
<div class="big">
<div class="div1">
<h3>家电</h3>
<ul class="elec">
<li>冰箱</li>
<li>洗衣机</li>
<li>空调</li>
</ul>
</div>
<div class="div2">
<h3>洗护</h3>
<ul class="wash">
<li>洗衣液</li>
<li>消毒液</li>
<li>柔顺剂</li>
</ul>
</div>
<div class="div3">
<h3>衣物</h3>
<ul class="clothes">
<li>衬衫</li>
<li>裤子</li>
<li>卫衣</li>
</ul>
</div>
</div>
</body>
</html>
鼠标悬停h3标题,li内容显示出来
23:26