请老师检查代码,谢谢

来源:3-17 编程练习

慕桂英7176016

2020-07-14 21:43:58

<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,initial-scale=1,
  user-scalable=no,maximum-scale=1,minimum-scale=1">
    <title></title>
    <style>
     /* 在此处补充代码*/

     *{
      padding: 0;
      margin: 0;
     }
     header{
         display:flex;
         background:black;
         justify-content:space-around;
         align-items:center;
     }  
     
     .nav{
         color:#fff;
         display:flex;
         justify-content:space-around;
         width:600px;
         list-style-type:none;
         font-size: 24px;
     }
     
     section{
         display:flex;
         width:100%;
         justify-content:space-around;
         flex-wrap:wrap;
         align-items:center;
         height:46vh;
         
         
     }
     
     html{
         height:100%;
     }
     
     .section{
         background-color:rgba(173,216,230,.9);
         width:45vw;
         display:flex;
         justify-content:space-around;
         align-items:center;
         
     }
     
     .box{
        display:flex;
        justify-content:center;
        width:257px;
        height: 19vh;
        flex-direction: column;
        justify-content: space-around;


         
     }
     

     .btn{
      background-color: orange;
      width: 7vw;
      height: 5vh;
      display: flex;
      align-items: center;
      justify-content: center;
      color: #fff;
      border-radius: 5px;  
     }


     .login{

      display: flex;
      justify-content: space-around;
      width: 22vh;
      height: 3vh;  
    
     }

     .login input{
       border: none;
       background-color: orange;
       border-radius: 3px;
       color: #fff;
       width: 3vw;
       height: 3vh;
     }
     
    </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>《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>《HTML5月CSS3实现动态网页》</p>
        <div>适用人群:有html和css基础的童鞋</div>
        <div>费用:¥599</div>
      </div>
      <div class="shopping">
        <div class="btn">加入购物车</div>
      </div>
    </div>
    </section>  
</body>
</html>


写回答

1回答

好帮手慕言

2020-07-15

同学你好,整体效果实现的不错,样式可以再优化一下,

1、给卡片设置圆角,效果更美观

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

2、当鼠标放在按钮上时,按钮上的文字颜色发生变化,例如:

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

祝学习愉快~

0

0 学习 · 6815 问题

查看课程