day07

作者: 墨雅丫 | 来源:发表于2018-07-18 20:55 被阅读0次

2018.07.17

1.表单

表单.PNG

2.input和button区别

input和button区别.PNG

3.搜索框

搜索框.PNG

input和button区别

4.margin中的小问题

margin中的小问题.PNG margin问题.PNG

5.

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
      *{margin:0px;padding: 0px;}
      body{
          font-family: Helvetica;
          color:#999;
      }
      .head{
          width:300px;
          height:60px;
          margin-top:10px;
          margin-left:60px;
          position: relative;
      }
      .head-img{
          position:absolute;
          top:5px;
          width:50px;
          height:50px;
          background: #f56600;
      }
      .head-right{
        position:absolute;
        color:#333;
        left:60px;/*向右向下移动 使文字与图片隔一段距离*/
        top:3px;
      }
      .head-right p{
          font-size:15px;/*让每个人都能享受科技的乐趣 的字体大小*/
      }
      .beijing{
          background-image: url("images6/banner.png");
          position:relative;
          width:100%;
          height:589px;
          margin-top:25px;
          background-position: -250px 0;/*让图片左移 使图片中的
          人物从右往中间移动留下放登陆界面的位置*/
      }
      .container{
          width:400px;
          height:525px;
          margin-left: auto;
          margin-right: auto;
          text-align:center;
          background: #fff;
          box-shadow: 0 0 15px 3px rgba(51, 51, 51, 0.53);
          overflow: hidden;
          position: absolute;
          top:32px;
          right:60px;
      }
      .header{
          font-size:22px;
          margin-top:30px;
          margin-bottom:30px;
      }
      .header-left{
          color:#f56600;
      }
      .header-middle{
          color:#e0e0e0;
      }
      .header-right{
          color:#333;
      }
      input{
        width: 336px;
        height: 30px;
        padding: 8px;
        outline: none;
        border:1px solid #e0e0e0;
      }
      .input-up{
          margin-bottom:15px;/*给用户名 密码 输入框下间距*/
      }
      .input-down{
          margin-bottom:20px;
      }
      .submit input{
          width:352px;
          height:50px;
          background: #f56600;
          color:white;
          font-size: 18px;
          margin-bottom: 20px;/*设置按钮*/
      }
      .middle{
          font-size: 16px;
          margin-bottom: 120px;
      }
      fieldset{
          border:none;/*去掉其他登陆方式的边框*/
      }
      .border{
          width:350px;
          border-top:1px solid #e0e0e0;
          margin-left:auto;
          margin-right:auto;
          margin-bottom:10px;/*显示一条横线*/
      }
      .AllIcon{
          margin-left:40px;
          margin-bottom:30px;
          overflow: hidden;/*隐藏照片不需要的多余的部分*/
          position:absolute;/*给下面的放图片的div设置绝对定位*/
          top:470px;
      }
      .AllIcon a{
          width:20px;
          height:20px;
          display: block;/* 将挤在一行的a标签分开*/
          float:left;/*给a设置左浮动 让其到一行去*/
          background: #747474  url("images6/icons_type.png") no-repeat;
          border-radius: 50%;/*让正方形变为圆形 用来显示图片*/
          margin-left:50px;/*让四个显示f的圆形分开*/
      }
      .AllIcon .one{
          background-position: -19px 0;
      }
      .AllIcon .two{
          background-position: -38px 0;
      }
      .AllIcon .three{
          background-position: -57px 0;
      }
      .AllIcon .four{
          background-position: -85px 0;
      }
      .footer{
          margin-top:50px;
          margin-bottom:80px;
          text-align:center;
          position: relative;/*因为里面的图片要绝对定位 所以其父元素要相对定位*/
        }
        .footer>p{
          margin-top:15px;
          font-size: 12px;
        }
        .footer img{
            width:15px;
            height:15px;
            position:absolute;
            top:50%;
            left:50%;
            margin-top:7px;
            margin-left:-39px;/*这是一个难点 需重点注意*/
        }
    </style>
</head>
<body>
    <div class="head">
          <div class="head-img">
              <img src="images6/mi-logo.png">
          </div>  
          <div class="head-right" >
                <h2>小米商城</h2>
                <p>让每个人都能享受科技的乐趣</p>
          </div>
    </div>
    <div class="beijing">
      <div class="container">
      <form>
         <p class="header">
            <span class="header-left">账号登陆</span>
            <span class="header-middle">|</span>
            <span class="header-right">扫码登陆</span>
         </p> 
         <input class="input-up" type="text" placeholder="邮箱/手机号/小米账号"><br>
         <input class="input-down" type="text" placeholder="密码"><br>
         <p class="submit"> 
            <input type="submit" value="立即登陆">
         </p>
         <p class="middle">
           <span>注册小米账号</span>
           <span>|</span>
           <span>忘记密码?</span>
         </p>
      </form>
      <div class="footer">
         <fieldset class="border">
           <legend>其他登陆方式</legend>
         </fieldset>
      </div>
      <div class="AllIcon">
          <a href="#" class="one"></a>
          <a href="#" class="two"></a>
          <a href="#" class="three"></a>
          <a href="#" class="four"></a>
      </div>
   </div>
</div>
<div class="footer">
     <p>
         <span><a>简体</a></span>
         <span><a>|</a></span>
         <span><a>繁体</a></span>
         <span><a>|</a></span> 
         <span><a>English</a></span> 
         <span><a>|</a></span> 
         <span><a>常见问题</a></span>
     </p>
     <p>
         小米公司版权所有-京ICP备10046444-
         &nbsp; &nbsp; &nbsp;京公网安备11010802020134号-京ICP证110507号
     </p>
     <img src="images6/index.jpg">
</div>  
</body>
</html>

.

相关文章

网友评论

      本文标题:day07

      本文链接:https://www.haomeiwen.com/subject/fjmapftx.html