老师请检查

来源:5-2 编程练习

mokongh

2019-05-07 22:29:13

<!DOCTYPE html>

<html>

<head>

    <meta charset="UTF-8">

    <title></title>

    <style>

      /*在此处补充代码*/

      *{

        margin: 0;

        padding: 0;

      }

      header{

          width: 100%;

          height: 56px;

          display: flex;

          flex-direction: row;

          justify-content: space-around;

          background: #000;

          align-items: center;

      }

       .logo{

        width: 190px;

        height: 56px;

       }

       .logo img{

        width: 100%;

        height: 100%;

       }

      .nav{

          display: flex;

          flex-direction: row;

          justify-content: space-around;

          align-items: center;

          color: #fff;

          

      }

      .nav li{

          list-style: none;

          line-height: 16px;

          text-align: center;

          width: 80px;

          color: #fff;

      }

      .login{

          width: 100px;

          display: flex;

          flex-direction: row;

          justify-content: space-around;

          align-items: center;

      }

      .login input{

          width: 30px;

          border: none;

          background: #ff0;

          color: #fff;

      }

      section{

        width: 100%;

        /*height: 300px;*/

        display: flex;

        flex-direction: row;

        flex-wrap: wrap; 

        justify-content: space-around;

      }

      .section{

        margin: 10px 5px 5px 0;

        width: 600px;

        height: 150px;

        background: #abcdef;

        border-radius: 10px;

        display: flex;

        flex-direction: row;

        justify-content: space-around;

        align-items: center;


      }

      .section .box{

        width: 300px;

        height: 150px;

        display: flex;

        flex-direction: row;

        flex-wrap: wrap;

        align-content: space-around;

      }

       .section .shopping .btn{

        width: 150px;

        height: 30px;

        line-height: 30px;

        text-align: center;

        background: #fa0;

        border-radius: 10px;

        color: #fff;

        font-weight: bold;

      }

    </style>

</head>

<body>

   <header>

     <div class="logo">

       <img src="http://climg.mukewang.com/59feb59700019dab01910057.png" 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回答

好帮手慕码

2019-05-08

同学你好!
代码效果实现的很好哦~

代码可优化:这里缺少了一个闭合尖括号

http://img.mukewang.com/climg/5cd249aa000101b303900159.jpg

如果帮助到了你 欢迎采纳 祝学习愉快~

0

0 学习 · 5012 问题

查看课程

相似问题