请老师检查

来源:5-2 编程练习

三年没洗澡

2019-03-29 10:03:24

<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title></title>
    <style>
    /* 在此处补充代码*/
    *{
      padding: 0;
      margin: 0;
      list-style: none;
    }
    header,.logo,.nav,.login{
      display: flex;
      background: black;
      justify-content: space-around;
      align-items: center;
      color: white;
      font-size: 30px;
    }
    .logo{
      width: 20%;
    }
    .nav{
      width: 30%;
    }
    .login{
      width: 10%;
    }
    img{
      display: block;
    }
    input{
      background: orange;
      border: none;
      outline: none;
      border-radius: 5px;
      width: 70px;
      height: 40px;
      font-size: 30px;
      color: white;
    }
    input:hover{
      color: red;
      cursor: pointer;
    }
    section{
      display: flex;
      justify-content: space-around;
      flex-wrap: wrap;
      align-content: space-around;
      width: 100%;
      height: 500px;
    }
    .section{
      display: flex;
      background-color: rgb(173,216,230);
      border-radius: 10px;
      width: 45%;
      height: 200px;
    }
    .box{
      flex: 3;
      display: flex;
      flex-direction: column;
      justify-content: space-around;
      font-size: 22px;
      text-indent: 2em;
    }
    .shopping{
      flex: 1;
      display: flex;
      align-items: center;
      justify-content: space-between;
    }
    .btn{
      color: white;
      width: 150px;
      height: 60px;
      line-height: 60px;
      text-align: center;
      background-color: orange;
      font-size: 24px;
      border-radius: 10px;
      font-weight: bolder;
      cursor: pointer;
    }
    </style>
</head>
<body>
<!-- 头部 -->
   <header>
     <div class="logo">
       <img src="http://climg.mukewang.com/59197ab000014f1503000100.jpg">
     </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>《从H5网页开发到移动端响应式开发》</p>
        <div>适用人群:有html、css、js、jQ基础的童鞋</div>
        <div>费用:¥499</div>
      </div>
      <div class="shopping">
        <div class="btn">加入购物车</div>
      </div>
    </div>
    <div class="section">
        <div class="box">
          <p>《从H5网页开发到移动端响应式开发》</p>
          <div>适用人群:有html、css、js、jQ基础的童鞋</div>
          <div>费用:¥599</div>
        </div>
        <div class="shopping">
          <div class="btn">加入购物车</div>
        </div>
    </div>
   </section>
</body>
</html>
写回答

1回答

好帮手慕星星

2019-03-29

你好,代码实现效果是不错的。

祝学习愉快!

0

0 学习 · 5012 问题

查看课程

相似问题