老师这样可以???

来源:3-17 编程练习

哈哈哈哈哈哈哈哈哦

2019-06-13 16:36:42

<!DOCTYPE html>

<html>

<head>

    <meta charset="UTF-8">

    <title></title>

    <style>

     /* 在此处补充代码*/

     *{

        margin: 0;

        padding: 0;


     }

     header{

        display: flex;

        justify-content: space-around;

        align-items: center;

        background:black;

     }

     .logo{

        display: block;

     }

     .nav{

        color: #fff;

        list-style: none;

        display: flex;

        justify-content: space-around;

        /*width: 33.3%;*/

     }


     .nav li{

        margin:0 40px;

     }

     .login {

        /*width:15%;*/

        display:flex;

        justify-content:space-between;

        }

        .login input{

            margin:0 15px;

        }

        input{

            height: 25px;

            width: 50px;

            background: orange;

            border: none;

            border-radius: 5px;

        }

        section{

            width: 100%;

            height: 250px;

            display: flex;

            justify-content: space-around;

            flex-wrap: wrap;

        }

        .section {

        display:flex;

        background:lightblue;

        width:45%;

       

        margin:10px 0 0 0;

        align-items:center;

        justify-content: space-around;

        border-radius: 5px;

    }

        .box{

            height: 100%;

            width: 260px;

            display: flex;

            flex-direction: column;

            justify-content: space-around;

        }

        .shopping{

            background-color: orange;

            color: white;

            border-radius: 5px;

            height: 40px;

            width: 100px;

            display: flex;

             justify-content: center;

             align-items: center;

        }


        .shopping:hover {

        color:red;

    }

    </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回答

好帮手慕慕子

2019-06-13

同学你好, 这样实现是可以的,继续加油哦

欢迎采纳,祝学习愉快~~~

0

0 学习 · 6815 问题

查看课程