请老师检查

来源:3-17 编程练习

SJ丶Peng

2019-09-16 18:23:45

<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title></title>
    <style>
     /*在此处补充代码*/
        *{margin: 0;padding: 0;font-size:12px;}
        html{height:100%;}
        body{height:100%;}
        header{
            height: 57px;
            display:flex;
            align-items:center;
            justify-content:space-around;
            background-color: #000;
        }
        .logo{
            width:20%; 
            height: 57px; 
        }
        .logo img{ 
            width:100%; 
            height: 57px; 
        } 
        .nav{
            width:35%;
            list-style:none;
            display:flex;
            justify-content:space-around;
            color:#fff;
        }
        .nav li{
            height:29px;
            line-height: 29px;
        }
        .login{
            width:15%;
            display:flex;
            align-items:center;
            justify-content:space-around;
        }
        .login input{
            background-color: #ffa500;
            height:22px;
            line-height:22px;
            font-size: 14px;
            color: #fff;
            border-radius: 5px;
            border-style: none;
            padding: 0 5px;
        }
        section{
            display: flex;
            flex: 1;
            height:50%;
            align-items: stretch;
            justify-content: space-around;
            align-items: center;
            flex-wrap: wrap;
        }
        .section{
            width:40%;
            height:85px;
            background-color: #add8e6;
            border-radius: 5px;
            display: flex;
            justify-content: space-around;
        }
        .box{
            display: flex;
            flex-direction: column;
            justify-content: space-around;
            width: 65%;
            height:100%;            
        }
        .shopping{
            display: flex;
            align-items: center;
        }
        .shopping .btn{
            height:20px;
            padding:5px;
            background-color:#ffa500; 
            color:#fff;
            border-radius: 5px;
        }
    </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-09-16

同学你好,当鼠标放在按钮上时,按钮上的文字颜色发生变化这个效果没有做哦。

建议:可以使用hover做。

祝学习愉快~

0
hJ丶Peng
h 这个没注意 嘿嘿 谢谢老师提醒
h019-09-17
共1条回复

0 学习 · 6815 问题

查看课程

相似问题