day24-作业

HTML代码:

<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8">
        <title>京东-欢迎登录</title>
        <!--设置网页图标
            rel:icon(设置图标)
            type:文件类型  image/图片类型(png,x-icon)
        -->
        <link rel="icon" type="image/x-icon" href="img/icon.ico"/>
        <link rel="stylesheet" type="text/css" href="css/jingdong.css"/>
        
    </head>
    <body>
        <!--========1.顶部========-->
        <div id="header">
            <!--上面-->
            <div class="h-top">
                <!--1.图标部分-->
                <div class="icon">
                    <img src="img/logo.png"/>
                    <img src="img/l-icon.png"/>
                </div>  
                <!--问卷-->
                <a href="https://surveys.jd.com/index.php?r=survey/index/sid/568245/lang/zh-Hans
" target="_blank">登录页面,调查问卷</a>
                
            </div>
            
            <!--下面的文字-->
            <div class="h-bottom">
                <p>依据《网络安全法》,为保障您的账户安全和正常使用,请尽快完成手机号验证! 新版 <a href="https://about.jd.com/privacy/" target="_blank">《京东隐私政策》</a> 已上线,将更有利于保护您的个人隐私。
</p>
            </div>
        </div>
        
        <!--========2.中间内容=======-->
        <div id="content">
            <div class="input_div">
                <div class="info-top">
                    <div class="top-top">
                        <!--<img src="img/warning.png"/>-->
                        <p>京东不会以任何理由要求您转账汇款,谨防诈骗。</p>
                    </div>
                    <div class="top-bottom">
                        <button>扫码登录</button>|
                        <button>账号登录</button>
                    </div>
                </div>
                <div class="info-mid">
                    <div class="username">
                        <img src="img/pygame.png"/>
                        <input type="text" name="username" id="" value="" placeholder="邮箱/用户名/已验证手机"/>  
                    </div>
                    
                    <div class="password">
                        <img src="img/password_icon.png"/>
                        <input type="password" name="password" id="" value="" placeholder="密码"/>
                    </div>
                    <a href="">忘记密码</a>
                    <div>
                    <button>登录</button>
                </div>
                </div>
                
                <div class="info-bottom">
                    <div class="d0">
                        <a href="" class="p1"><img src="img/qq.png"/></a>
                        <a href="" class="d1">QQ</a>
                        <a href="" class="p2"><img src="img/weixin.png"/></a>
                        <a href="" class="d2">微信</a>
                        <a href="" class="p3"><img src="img/right.png"/></a>
                        <a href="" class="d3">立即注册</a>
                        <span class="x">|</span>
                    </div>
                </div>
            </div>
        </div>
        
        <!--========3.底部=========-->
        <div id="footer">
            <a href="">关于我们</a>|
            <a href="">联系我们</a>|
            <a href="">人才招聘</a>|
            <a href="">商家入驻</a>|
            <a href="">广告服务</a>|
            <a href="">手机京东</a>|
            <a href="">友情链接</a>|
            <a href="">销售联盟</a>|
            <a href="">京东社区</a>|
            <a href="">京东公益</a>|
            <a href="">English Site</a>
            <p class="end">Copyright © 2004-2018  京东JD.com 版权所有</p>
        </div>
        
    </body>
</html>

CSS代码:

/*========0.通用==================*/
*{
   margin: 0;
   padding: 0;
   position: relative;
}

a{
   text-decoration: none;
}


/*========1.header===========*/
#header{
   width: 100%;
   height: 120px;
   /*background-color: red;*/
}
#header .h-top{
   width: 100%;
   height: 80px;
   /*background-color: hotpink;*/
}
#header .h-top a{
   /*布局*/
   position: absolute;
   right: 40px;
   bottom: 10px;
   
   /*字体*/
   font-size: 12px;
   color: #aaaaaa;
   
   /*背景图*/
   background: url(../img/q-icon.png) no-repeat 0 center;
   padding-left: 20px;
}
#header .h-top a:hover{
   color: red;
   text-decoration: underline;
   }

#header .h-top .icon{
   position: absolute;
   left: 142px;
   
   /*垂直居中*/
   height: 60px;
   top: 50%;
   line-height: 60px;
   margin: -30px 0 0 0 ;
}
#header .h-bottom{
   width: 100%;
   height: 40px;
   background-color: rgb(255,248,240);
}
/*用背景图布局*/
#header .h-bottom p{
   text-align: center;
   height: 40px;
   line-height: 40px;
   
   color: rgb(153,153,153);
   font-size: 12px;
   
   background: url(../img/warning.png) no-repeat 260px center;
}
#header .h-bottom p a{
   color: rgb(40,40,40);
}
#header .h-bottom p a:hover{
   text-decoration: underline;
}
/*========2.content===========*/
#content{
   width: 100%;
   height: 474px;
   
   background: url(../img/bg.png) no-repeat 20% center;
   background-color: rgb(11,142,212);
   
}
#content .input_div{
   width: 340px;
   height: 440px;
   background-color: white;
   
   position: absolute;
   right: 160px;
   top: 10px;
   
}
#content .input_div .info-top{
   height: 100px;
   background-color: rgb(255,248,240);
       
   /*设置分割线*/
   border-bottom: 1px solid rgb(244,244,244);
}
.top-top{
   text-align: center;
   height: 40px;
   line-height: 40px;
   
   color: rgb(153,153,153);
   font-size: 12px;
   background: url(../img/warning.png) no-repeat 16px center;
}
.top-bottom{
   height: 60px;
   background-color: white;
   
   text-align: center;
   
   /*设置竖线的颜色*/
   color: rgb(200,200,200);

}
.top-bottom button{
   width: 160px;
   height: 60px;
   
   /*去掉按钮的边框和背景色*/
   background-color: rgb(0,0,0,0);
   border: 0;
   
   
   font-size: 20px;
   color: rgb(53,53,53);
}
.top-bottom button:hover{
   color: red;
}
.top-bottom button:focus{
   color: red;
   
   /*按钮和输入框成为焦点后默认的边框,是outline*/
   outline: 0;
}


#content .input_div .info-mid{
   height: 290px;
   background-color: white;
}
/*用户名和密码输入*/
#content .input_div .info-mid .username,#content .input_div .info-mid .password{
   background-color: white;
   width: auto;
   height: 40px;
   
   position: absolute;
   left: 10px;
   right: 10px;
   top: 40px;
   
   border: 1px solid rgb(180,180,180);
}
#content .input_div .info-mid .password{
   top: 110px;
   
}

#content .input_div .info-mid img{
   float: left;
   height: 100%;
   border-right: 1px solid rgb(180,180,180);
}

#content .input_div .info-mid input{
   border: 0;
   float: left;
   
   height: 100%;
   width: 80%;
   
   padding-left: 20px;
}

/*设置成为焦点的状态的样式*/
#content .input_div .info-mid input:focus{
   outline: none;
}

/*忘记密码*/
#content .input_div .info-mid a{
   position: absolute;
   top: 180px;
   right: 20px;
   
   font-size:12px ;
   color: rgb(180,180,180)
}
#content .input_div .info-mid a:hover{
   color: red;
   text-decoration: underline;
}

#content .input_div .info-mid button{
   position: absolute;
   height: 35px;
   width: 305px;
   text-align: center;
   left: 19px;
   top: 230px;
   background-color: red;
   border: 0;
   outline: none;
   
   font-size: 20px;
   letter-spacing: 10px;
}

#content .input_div .info-bottom{
   height: 50px;
}
#content .input_div .info-bottom .d0{
   line-height: 50px;
   background-color: rgb(252,252,252);
   border-bottom: 1px solid rgb(244,244,244);
}
#content .input_div .info-bottom .x{
   position: absolute;
   left: 80px;
}
#content .input_div .info-bottom .p1{
   position: absolute;
   left: 20px;
   top: 7px;
}
#content .input_div .info-bottom .d1{
   position: absolute;
   left: 45px;
}
#content .input_div .info-bottom .p2{
   position: absolute;
   left: 90px;
   top: 7px;
}
#content .input_div .info-bottom .d2{
   position: absolute;
   left: 115px;
}
#content .input_div .info-bottom .p3{
   position: absolute;
   right: 80px;
   top: 7px;
}
#content .input_div .info-bottom .d3{
   position: absolute;
   right: 20px;
}
#content .input_div .info-bottom .d0 a:hover{
   color: red;
   text-decoration: underline;
}
/*========3.footer===========*/
#footer{
   width: 100%;
   height:120px ;
   background-color: rgb(255,255,255);
   text-align: center;
   line-height: 60px;
   font-size:12px ;
}
#footer a{
   display: inline;
   margin: 10px;
   color:rgb(102,102,102) ;
}
#footer a:hover{
   color: red;
   text-decoration: underline;
}
#footer .end{
   display: block;
   position: absolute;
   top: 30px;
   left: 550px;
}

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容