老师帮忙检查下,还有问题吗?

来源:5-2 编程练习

慕莱坞4298532

2018-12-18 17:13:05

<!DOCTYPE html>
<html lang="en">
<head>
   <meta charset="UTF-8">
   <title>Title</title>
   <style>
*{margin: 0;
padding:0;
}
       header{
           width:100%;
height: 80px;
background: black;
color:white;
display: flex;
justify-content: space-around;
}
       header .logo {
           display: flex;
}
       header ul{
           width:30%;
list-style: none;
display: flex;
justify-content: space-between;
align-items:center;
}
       header .login{
           width:15%;
display: flex;
justify-content: space-around;
align-items:center;
}
       header .login input{
           width: 60px;
height: 30px;
background: orange;
border-radius: 5px;
border:none;
color:white;
font-size: 18px;
}
       section{
           width:100%;
display: flex;
justify-content: space-around;
flex-wrap:wrap;
padding-top: 30px;
}
       section .section{
           width:40%;
height: 120px;
background: lightskyblue;
border-radius: 10px;
margin-bottom: 20px;
display: flex;
align-items:center;
justify-content: space-around;
}
       section .section .box{
           display: flex;
flex-direction: column;
line-height: 30px;
}
       section .section .shopping .btn{
           width: 100px;
height: 40px;
background: orange;
color:white;
font-size: 18px;
line-height: 40px;
text-align: center;
border-radius: 8px;
}

   </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>《前端小白入门手册》</p>
           <div>适用人群:没有任何前端基础的小白</div>
           <div>费用:¥499</div>
       </div>
       <div class="shopping">
           <div class="btn">加入购物车</div>
       </div>
   </div>
</section>
</body>
</html>

写回答

1回答

好帮手慕星星

2018-12-18

经测试代码实现的效果是不错的,没有问题。

继续加油!

0

0 学习 · 5012 问题

查看课程