老师帮忙检查一下

来源:3-17 编程练习

慕斯卡3605978

2020-07-02 20:43:47

<!DOCTYPE html>

<html>

<head>

    <meta charset="UTF-8">

    <title></title>

    <style>

     /* 在此处补充代码*/

     *{

      margin: 0;

      padding: 0;

      list-style: none;

     }

     html,body{

      height: 100%;

     }

     body{

      display: flex;

      flex-direction: column;

     }

     header{

      width: 100%;

      background: black;

      display: flex;

      justify-content: space-around;

      align-items: center;

      height: 60px;

     }

     .logo img{

      display: block;

      width: 180px;

      height: 60px;

     }

     .nav{

      display: flex;

      width: 40%;

      justify-content: space-around;

      color: white;

     }

     .login{

      display: flex;

      width: 8%;

      justify-content: space-between;

     }

     .login input{

      background-color: orange;

      color: white;

      border: none;

      padding: 5px;

      border-radius: 3px;

     }

     section{

      flex: 1;

      display: flex;

      justify-content: space-around;

      flex-wrap: wrap;

      align-content: space-around;


     }

     .section{

      width: 45%;

      background-color: blue;

      border-radius: 8px;

      height: 150px;

      font-size: 15px;


      display: flex;

      justify-content: space-around;

      align-items: center;

     }

     .box{

      height: 100%;

      display: flex;

      flex-direction: column;

      justify-content: space-around;

     }

     .btn{

      background-color: orange;

      color: white;

      font-weight: bold;

      font-size: 16px;

      border-radius: 5px;

      padding: 8px;


     }

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

</body>

</html>


写回答

1回答

好帮手慕粉

2020-07-03

同学你好,效果实现的是与练习要求不太符合。

1、应该是两行卡片,可以再增加一行:

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

2、整体显示的效果,也可以再调整下:

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

3、当鼠标放在按钮上时,按钮上的文字颜色应该发生变化,可以使用hover实现:

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

如果我的回答帮助了你,欢迎采纳。祝学习愉快~

0

0 学习 · 6815 问题

查看课程