老师哪里还需要改进一下
来源:3-17 编程练习
慕勒2048820
2019-05-31 19:50:28
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
<style>
/* 在此处补充代码*/
header {
display:flex;
justify-content:space-around;
align-items:center;
background:black;
}
.logo {
display:block;
}
.nav {
display:flex;
list-style:none;
width:33.3%;
justify-content:space-around;
color:#fff;
}
.login {
width:15%;
display:flex;
justify-content:space-between;
}
input[type="button"] {
height:25px;
width:50px;
background:orange;
border:none;
}
section {
width: 100%;
height: 360px;
display:flex;
justify-content:space-around;
flex-wrap: wrap;
}
.section {
display:flex;
background:lightblue;
width:45%;
/*height:100%;*/
margin:10px 0 0 0;
align-items:center;
justify-content: space-around;
}
.box{
height: 100%;
width:260px;
display: flex;
flex-direction: column;
justify-content: space-around;
}
.shopping {
background-color: orange;
color: white;
border-radius: 5px;
height: 40px;
width: 100px;
display: flex;
justify-content: center;
align-items: center;
}
.box: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回答
你好同学,根据效果图,需要给头部的按钮与下面的4个盒子设置圆角,如下:

另外,因为body有默认的间距,很多元素也会有默认间距,所以一般做页面的时候,先使用通配符给所以元素初始化间距更好

如下:

祝学习愉快,望采纳。
相似问题