这样写有什么需要改进的

来源:5-2 编程练习

Aries典

2018-09-03 17:28:16

<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title></title>
    <style>
      *{
        padding: 0;
        margin: 0;
      }
      header{
        background-color: #000;
        display: flex;
        align-items: center;
        justify-content: space-around;
      }
      ul{
        list-style-type: none;
        display: flex;
        color: #fff;
      }
      ul li{
             width: 120px;
      }
      header input{
        border-radius:5px;  
        padding: 5px;
        text-align: center;
        border:none;
        color: #fff;
        background-color: orange;
      }
      section{
        width: 100%;
         display: flex;
         flex-wrap: wrap;
         justify-content: center;
      }
        
      .section{
        border-radius: 20px;
        padding: 30px;
        width: 30%;
        margin: 30px;
        display: flex;
        background-color: #add8e6;
        justify-content: space-between;
        align-items: center;
      }
      .box{
        display: flex;
        flex-direction: column;
        justify-content: center;
      }
      .shopping{
        width: 90px;
        height: 30px;
        line-height: 30px;
        background-color: orange;
        color: #fff;
        text-align: center;
        border-radius: 5px;
        justify-content: center;
      }
      .shopping:hover{
        cursor: pointer;
        color: blue;
      }
    </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>
        <br>
        <div>适用人群:没有任何前端基础的小白</div>
        <br>
        <div>费用:¥499</div>
      </div>
      <div class="shopping">
        <div class="btn">加入购物车</div>
      </div>
    </div>
    <div class="section">
      <div class="box">
        <p>《HTML5月CSS3实现动态网页》</p>
        <br>
        <div>适用人群:有html和css基础的童鞋</div>
        <br>
        <div>费用:¥599</div>
      </div>
      <div class="shopping">
        <div class="btn">加入购物车</div>
      </div>
    </div>
    <div class="section">
      <div class="box">
        <p>《前端小白入门手册》</p>
        <br>
        <div>适用人群:没有任何前端基础的小白</div>
        <br>
        <div>费用:¥499</div>
      </div>
      <div class="shopping">
        <div class="btn">加入购物车</div>
      </div>
    </div>
    <div class="section">
      <div class="box">
        <p>《HTML5月CSS3实现动态网页》</p>
        <br>
        <div>适用人群:有html和css基础的童鞋</div>
        <br>
        <div>费用:¥599</div>
      </div>
      <div class="shopping">
        <div class="btn">加入购物车</div>
      </div>
    </div>
    </section>  
</body>
</html>


写回答

1回答

好帮手慕夭夭

2018-09-03

效果是可以的呢  ,继续加油 ,祝学习愉快 ~

0

0 学习 · 5012 问题

查看课程