有瑕疵么?。。。
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<title></title>
<style>
/* 在此处补充代码*/
* {
list-style: none;
margin: 0;
padding: 0;
border: none;
outline: none;
}
body {
display: flex;
flex-direction: column;
}
body header {
display: flex;
justify-content: space-around;
background-color: #333;
width: 100%;
height: 57px;
}
body header .nav {
display: flex;
}
body header .nav li {
padding: 0 50px 0 50px;
line-height: 57px;
color: #fff;
}
body header .login {
display: flex;
align-items: center;
justify-content: space-between;
width: 75px;
}
.btn {
border-radius: 5px;
background-color: tomato;
padding: 1px 3px;
}
body section {
display: flex;
flex-wrap: wrap;
justify-content: space-around;
align-content: space-around;
height: 250px;
}
body section .section {
background-color: turquoise;
width: 45%;
height: 100px;
border-radius: 5px;
display: flex;
justify-content: space-around;
}
body section .section .box {
display: flex;
flex-direction: column;
justify-content: space-around;
}
body section .section .shopping {
display: flex;
/* flex-direction: column; */
/* justify-content: space-around; */
align-items: center;
}
/* .class-center{
display: flex;
flex-direction: column;
justify-content: space-around;
} */
</style>
</head>
<body>
<!-- 头部 -->
<header>
<div class="logo">
<img src="http://img1.sycdn.imooc.com/climg//59feb59700019dab01910057.png" alt="" />
</div>
<ul class="nav">
<li>课程</li>
<li>路径</li>
<li>猿问</li>
<li>手记</li>
</ul>
<div class="login">
<input type="button" value="登录" class="btn" />
<input type="button" value="注册" class="btn" />
</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积分~
来为老师/同学的回答评分吧
0 星