麻烦老师看看哪里有需要改进的?
来源:4-7 编程练习
慕勒2497449
2020-02-19 16:44:54
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>display属性</title>
<style type="text/css">
/*样式补充*/
*{
margin:0;
padding:0;
}
.big{
margin:0 auto;
width:200px;
background-color:#f2f4f6;
border:2px solid #d9dde1;
}
h3{
font:bold 20px/40px "微软雅黑",sans-Serif;
text-align:center;
border-bottom:1px solid #d9dde1;
height:40px;
}
li{
list-style-type:none;
text-align:center;
display:none;
}
.div1:hover .elec li,.div2:hover .wash li, .div3:hover .clothes li{
display:block;
background-color:#ffffff;
padding:10px;
}
</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>1回答
好帮手慕粉
2020-02-19
同学你好 ,代码实现的是正确的,继续加油,祝学习愉快~
相似问题
回答 1
回答 1
回答 1
回答 1
回答 2