老师,还有哪里需要改进吗
来源:3-17 编程练习
97_x
2019-06-17 17:09:31
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
<style>
*{
margin:0;
padding:0;
list-style:none;
box-sizing:border-box;
}
header{
width:100%;
display:flex;
align-items:center;
justify-content:space-around;
background:#000;
}
.logo{
display:flex;
align-items:center;
justify-content:space-around;
width:200px;
}
.logo img{
height:60px;
}
.nav{
width:450px;
display:flex;
align-items:center;
justify-content:space-around;
}
.nav li{
width:60px;
color:#fff;
}
.login{
display:flex;
align-items:center;
justify-content:space-around;
width:100px;
}
.login input{
background:orange;
border:none;
border-radius:3px;
padding:2px 4px;
color:#fff;
}
section{
width:100%;
height:300px;
display:flex;
align-items:center;
justify-content:space-around;
flex-wrap:wrap;
}
.section{
width:480px;
height:120px;
border:1px solid #add8e6;
border-radius:10px;
display:flex;
align-items:center;
justify-content:space-around;
background:#add8e6;
}
.section .box{
display:flex;
flex-direction:column;
justify-content:space-around;
}
.section .box p,.section .box div{
height:35px;
}
.section .shopping .btn{
height:30px;
width:100px;
background:#ffa500;
border-radius:8px;
color:#fff;
display:flex;
align-items:center;
justify-content:center;
}
.section .shopping div:hover{
color:#000;
}/* 在此处补充代码*/
</style>
</head>
<body>
<!-- 头部 -->
<header>
<div class="logo">
<img src="http://climg.mukewang.com/59197ab000014f1503000100.jpg" alt="">
</div>
<ul class="nav">
<li>课程</li>
<li>路径</li>
<li>猿问</li>
<li>手记</li>
</ul>
<div class="login">
<input type="button" value="登录">
<input type="button" value="注册">
</div>
</header>
<!-- 主体内容 -->
<section>
<div class="section">
<div class="box">
<p>《前端小白入门手册》</p>
<div>适用人群:没有任何前端基础的小白</div>
<div>费用:¥499</div>
</div>
<div class="shopping">
<div class="btn">加入购物车</div>
</div>
</div>
<div class="section">
<div class="box">
<p>《HTML5月CSS3实现动态网页》</p>
<div>适用人群:有html和css基础的童鞋</div>
<div>费用:¥599</div>
</div>
<div class="shopping">
<div class="btn">加入购物车</div>
</div>
</div>
<div class="section">
<div class="box">
<p>《HTML5月CSS3实现动态网页》</p>
<div>适用人群:有html和css基础的童鞋</div>
<div>费用:¥599</div>
</div>
<div class="shopping">
<div class="btn">加入购物车</div>
</div>
</div>
<div class="section">
<div class="box">
<p>《HTML5月CSS3实现动态网页》</p>
<div>适用人群:有html和css基础的童鞋</div>
<div>费用:¥599</div>
</div>
<div class="shopping">
<div class="btn">加入购物车</div>
</div>
</div>
</section>
</body>
</html>
1回答
大分辨率的电脑下一行显示的是4个,题目要求是一行显示2个

可以参考:

希望可以帮到你!
相似问题