这样写可以吗
来源:5-2 编程练习
 
			田马达加斯加
2018-09-05 20:23:33
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
<style>
/* 在此处补充代码*/
/*header*/
header{
height:100px;
background:#000;
display:flex;
justify-content:space-around;
align-items:center;
}
.logo{
height:100px;
overflow: hidden;
}
ul{
list-style: none;
width:600px;
color:#fff;
display:flex;
justify-content:space-around;
}
div.login{
width:150px;
display:flex;
justify-content:space-between;
}
input{
background:orange;
width:60px;
outline:none;
border:none;
border-radius:5px;
color:#fff;
}
/*section*/
section{
display:flex;
justify-content:space-around;
flex-direction:row;
flex-wrap:wrap;
}
section div.section{
width:40%;
height:300px;
padding-left:50px;
background:#8fade4;
margin:50px 0px;
border-radius:40px;
display:flex;
justify-content:space-around;
align-items:center;
}
section div.section .shopping .btn{
width:160px;
height:65px;
line-height:65px;
text-align:center;
background:orange;
border-radius:10px;
color:#fff;
font-weight:bold;
}
</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回答
页面效果是不错的呢,棒棒哒!但是还有一个要求:当鼠标放在按钮上时,按钮上的文字颜色发生变化。这个可以完成一下哦。祝学习愉快~~
相似问题