老师看看那边需要完善的吧
来源:5-2 编程练习
大脸猫大脸猫喵喵喵
2018-07-21 20:14:12
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
<style>
/* 在此处补充代码*/
*{
padding: 0;
margin: 0;
}
ul li{
list-style: none;
}
header{
height: 80px;
background: #000;
display: flex;
justify-content: space-between;
padding: 0 60px;
}
header .logo img{
max-height: 80px;
width: auto;
}
header .nav{
width: 40%;
height: 100%;
color: #fff;
display: flex;
align-items: center;
justify-content: space-around;
font-size: 20px;
}
header .nav li{
cursor: pointer;
}
header .login{
height: 100%;
display: flex;
align-items: center;
justify-content: center;
}
header .login input{
height: 20px;
width: 35px;
text-align: center;
line-height: 20px;
background: orange;
color: #fff;
border: none;
border-radius: 3px;
margin-left: 10px;
cursor: pointer;
}
header .login input:hover{
color: red;
}
section{
padding: 20px 55px;
display: flex;
align-content: center;
justify-content: space-between;
flex-wrap: wrap;
}
.section{
display: flex;
align-items: center;
justify-content: space-between;
padding: 15px 35px;
background: lightblue;
border-radius: 10px;
width: 480px;
height: 120px;
margin-bottom: 10px;
}
.box{
height: 100%;
display: flex;
flex-direction: column;
justify-content: space-between;
}
.btn{
padding: 6px 10px;
background: orange;
border-radius: 5px;
color: #fff;
cursor: pointer;
}
.btn:hover{
color: red
}
</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回答
好帮手慕糖
2018-07-22
你好,建议:可以把左右的内边距修改下,然后把宽度调整下。

祝学习愉快~
相似问题