4-5编程练习,总觉得,边框好像有点重复的问题。请帮查看
<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
<title>display属性</title>
<style type="text/css">
/*样式补充*/
*{
padding: 0;
margin: 0;
}
.big{
width: 98px;
height: auto;
margin: aUto;
border:1px solid rgba(128, 128, 128, 0.281);
background-color: rgba(245, 244, 244, 0.795);
}
h3{
text-align: center;
border-top:1px solid rgba(128, 128, 128, 0.281);
}
ul {
border-top:1px solid rgba(128, 128, 128, 0.281);
background-color: white;
padding-left:30px ;
width: 68px;
}
li {
list-style-type: none;
line-height: 1.5em;
display: none;
}
div :hover li{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>10
收起
正在回答 回答被采纳积分+1
1回答
前端小白入门系列课程
- 参与学习 人
- 提交作业 11218 份
- 解答问题 36712 个
从一个不会编程的小白到一个老司机是需要过程的,首先得入门,学习基础知识,然后才能进阶,最后再到精通,本专题是你走进前端世界的不二选择!
了解课程
恭喜解决一个难题,获得1积分~
来为老师/同学的回答评分吧
0 星