老师,请检查
来源:3-17 编程练习
phantom0308
2020-09-16 15:41:38
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
<style>
/* 在此处补充代码*/
*{
margin:0px;
padding:0px;
}
ul,li{
list-style: none;
}
header{
border-top: 1px solid rgba(255,255,255,.6);
display: flex;
justify-content: space-between;
background-color: #000;
}
header .logo,
header .login{
flex:1;
display: flex;
justify-content: center;
}
header .nav {
font-size: 18px;
color: #fff;
display: flex;
justify-content: space-between;
width: 40%;
}
header .nav li{
flex: 1;
text-align: center;
align-self: center;
}
header .login{
align-items: center;
justify-content: center;
}
header .login input{
border:none;
outline: none;
background-color: orange;
color: #fff;
font-size: 18px;
padding: 10px 5px;
border-radius: 6px;
margin-right: 30px;
}
section{
display: flex;
background-color: #fff;
justify-content: space-around;
flex-wrap: wrap;
width:100%;
}
section .section{
background-color: #b6d7e4;
width: 40%;
margin-top: 15px;
padding: 10px 40px;
display: flex;
justify-content: space-between;
border-radius: 10px;
height: 150px;
align-items: center;
}
section .shopping .btn{
background-color: orange;
color: #fff;
padding:10px 8px;
border-radius: 6px;
}
</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>《前端小白入门手册》</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>
</section>
</body>
</html>1回答
好帮手慕言
2020-09-16
同学你好,整体效果实现的不错,不过每行文字之间离的太近了,影响美观。

建议:可以给文字设置行高。
祝学习愉快~