这样子有什么需要改进的吗

来源:5-2 编程练习

慕瓜9363615

2017-11-05 14:08:45

<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title></title>
    <style>
     *{


      padding: 0;


      margin: 0;


     }


 header{
  display:flex;
  background-color:black;
  width:100%;
  align-items:center;
  justify-content:space-around;
  font-size:24px;
  }
 .logo{
  width:10%;}
 img{
  height:80px;}
    .nav{
  list-style:none;
  color:white;
  display:flex;
  width:40%;
  justify-content:space-around;
  }
 input[type='button']{
  background-color:orange;
  color:white;
  font-size:24px;
  border:0;
  border-radius:3px;
  padding:5px;}
 input[type='button']:hover{
  color:black;
  }
 .btn:hover{
  color:black;
  cursor:pointer;}
 .login{
  width:14%;
  display:flex;
  justify-content:space-around;}
 section{
  display:flex;
  justify-content:space-around;
  flex-wrap:wrap;}
 .section{
  display:flex;
  background-color:#729DD3;
  border-radius:10px;
  width:40%;
  height:200px;
  font-size:18px;
  justify-content:space-around;
  margin-top:30px;
  }
 .box{
  display:flex;
  flex-direction:column;
  justify-content:space-around;
  }
 .shopping{
  display:flex;
  flex-direction:column;
  justify-content:center;
  }
 .btn{
  width:120px;
  height:50px;
  background-color:#FC3;
  line-height:50px;
  border-radius:8px;
  text-align:center;
  color:white;
  }
    </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回答

怎么都被占用了呢

2017-11-06

可以的,继续加油!!

0

0 学习 · 5012 问题

查看课程