老师,请检查

来源:5-2 编程练习

慕函数4436287

2019-05-19 21:13:04

<!DOCTYPE html>
<html>
<head>
   <meta charset="UTF-8">
   <title></title>
   <style>
    /* 在此处补充代码*/
    *{margin: 0;padding: 0;list-style: none;color: #fff;border: none;}
    bady{background-color: lightgray;}
    header,.logo,.nav,.login{
        height: 100px;
        background-color: #000;
        display: flex;
        justify-content:space-around;
        align-items: center;
       
    }
    .nav{width: 40%;}
    input{
       background: orange;
       border: none;
       border-radius: 3px;
       width: 40px;
       height: 28px;
       margin-right: 20px;
    }
    /* section部分 */
    section{
        width: 96%;
        background: #fff;
        margin: 0 auto;
        display: flex;
        justify-content:space-around;
       
    }
    .section{
       width: 600px;
       height: 120px;
       padding: 16px;
       padding: 30px;
       margin:20px;
       box-sizing: border-box;
       background-color: #b5d7e4;
       color: #000;
       border-radius: 6px;
       display: flex;
       justify-content: space-between;
    }
   
    .box p{
        line-height: 24px;
        font-size:16px;
        color:#000;
    }
    .box div{
        line-height: 20px;
        font-size:16px;
        color:#000;
    }
    .box{
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
    .btn{
       width: 80px;
       height: 40px;
       line-height: 40px;  
       background: #ff7400;
       color: #fff;
       border: 1px solid #d8d8d8;
       border-radius: 4px;  
       text-align: center;
       outline: none;
       padding: 0px 10px 0px 10px;
    }
    .shopping{
       display: flex;
       justify-content: center;
       align-items: center;
    }
   
   </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>
   </section>  
   <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-05-20

你好,代码实现效果是不错的,很棒哦!

祝学习愉快!

0

0 学习 · 5012 问题

查看课程

相似问题