请老师检查是否正确

来源:5-2 编程练习

慕数据3146548

2019-06-02 23:13:37

<!DOCTYPE html>

<html>

<head>

    <meta charset="UTF-8">

    <title></title>

    <style>

    *{

    margin: 0;

    padding: 0;

    }

    input,ul{

    color: #fff;

   

    }

     header,.logo,.nav,.login{

      display: flex;

      justify-content: space-around;

      align-items: center;

     }

     header{

      background-color: black;

     }

     ul{

      flex-basis: 300px;

      list-style: none;

     }

     input{

      background-color: orange;

      border-radius: 3px;

      border-style: none;

      height: 25px;

      margin-right: 20px;

     }

     section{

      display: flex;

      justify-content: space-around;

     }

     .section{

      height: 120px;

      background-color: #33CCFF;

      display:flex;

      align-items: center;

      color: #fff;

      justify-content: space-around;

      flex-basis: 45%;

margin-top: 10px;

     }


     .box{

      display: flex;

      flex-direction: column;

      justify-content: space-between;

      height: 90px;


     }

     .shopping{

      background-color: orange;

      border-radius: 3px;

      width: 90px;

      height: 25px;

      text-align: center;

      line-height: 25px;

      cursor: pointer;

     }

     .shopping:hover{

      color: red;

     }

    </style>

</head>

<body>

<!-- 头部 -->

   <header>

     <div class="logo">

       <img src="http://img1.sycdn.imooc.com\/climg/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>

    </section>  

</body>

</html>


写回答

1回答

好帮手慕码

2019-06-03

同学你好!

代码效果实现是可以的哦~

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

0

0 学习 · 5012 问题

查看课程