day25-京东登录
2018-11-01 本文已影响0人
xdxh
京东登录页面
1.index.html代码
<!-- index.html是网站首页对应的html文件 -->
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<!-- 设置网页标题 -->
<title>京东-欢迎登录</title>
<!-- 设置网页图标 -->
<link rel="icon" type="image/ico" href="img/favicon.ico"/>
<!-- 导入样式表 -->
<link rel="stylesheet" type="text/css" href="css/index.css"/>
</head>
<body>
<!-- ==============顶部 ==============-->
<div id="header">
<!-- 顶部的顶部 -->
<div id="top">
<div>
<img src="img/logo.png"/>
<img src="img/l-icon.png"/>
</div>
<a id="survey" target="_blank" href="https://surveys.jd.com/index.php?r=survey/index/sid/568245/lang/zh-Hans">登录页面,调查问卷</a>
</div>
<!-- 顶部的底部-->
<div id="bottom">
<p><img src="img/warning.png"/>   依据《网络安全法》,为保障您的账户安全和正常使用,请尽快完成手机号验证! 新版<a target="_blank" href="https://about.jd.com/privacy/">《京东隐私政策》</a>,将更有利于保护您的个人隐私。</p>
</div>
</div>
<!-- ==============中间============== -->
<div id="content">
<!-- 登录框 -->
<div id="login_page">
<!-- 提示块 -->
<div id="div1">
<p><img src="img/xx.png"/>  京东不会以任何理由要求您转账汇款,谨防诈骗。</p>
</div>
<!-- 按钮块 -->
<div id="div2">
<button id="btn1">扫码登录</button>|
<button id="btn2">账号登录</button>
</div>
<!-- 信息收集块 -->
<div id="div3">
<div id="username">
<img src="img/pygame.png" />
<input type="text" name="username" id="" value="" placeholder="邮箱/用户名/已验证手机"/>
</div>
<div id="password">
<img src="img/password_icon.png"/>
<input type="password" name="password" id="" value="" placeholder="密码"/>
</div>
<a target="_blank" href="https://aq.jd.com/process/findPwd?s=1">忘记密码</a>
<button>登 录</button>
</div>
<!-- 注册和第三方登录 -->
<div id="div4">
<a id="a1" href="https://graph.qq.com/oauth2.0/show?which=Login&display=pc&response_type=code&state=E7087ABE3A0678C90DCF626BDC51C76AC909CC752588D39A23FA8004EBDB4A8DF75CBDEB17FD72E1133286F6D79D1353&client_id=100273020&redirect_uri=https%3A%2F%2Fqq.jd.com%2Fnew%2Fqq%2Fcallback.action%3Fview%3Dnull%26uuid%3Df280325cabbd4eba96123152455b8b26">QQ</a>|
<a id="a2" href="https://open.weixin.qq.com/connect/qrconnect?appid=wx827225356b689e24&state=A34FFE9FE19B5D10BA52EF7ACF2E2D2A65C3B93F7D23FA1520AC3E3339E30B4DB75893FBEC28A47861909C5A0E225C4C&redirect_uri=https%3A%2F%2Fqq.jd.com%2Fnew%2Fwx%2Fcallback.action%3Fview%3Dnull%26uuid%3D7bbb0e1b53a8405ea82679f58816802b&response_type=code&scope=snsapi_login#wechat_redirect">微信</a>
<a id="a3" target="_blank" href="https://reg.jd.com/reg/person?ReturnUrl=http%3A%2F%2Fwww.jd.com">立即注册</a>
</div>
</div>
</div>
<!-- ==============底部============== -->
<div id="footer">
<div id="">
<a target="_blank" href="https://www.jd.com/">关于我们</a>|
<a target="_blank" href="http://about.jd.com/contact">联系我们</a>|
<a target="_blank" href="http://zhaopin.jd.com/home">人才招聘</a>|
<a target="_blank" href="https://www.jd.com/">商家入驻</a>|
<a target="_blank" href="https://www.jd.com/">广告服务</a>|
<a target="_blank" href="https://app.jd.com/">手机京东</a>|
<a target="_blank" href="https://club.jd.com/links.aspx">友情链接</a>|
<a target="_blank" href="https://media.jd.com/">销售联盟</a>|
<a target="_blank" href="https://sale.jd.com/act/n0hAvqy5CW8.html">京东社区</a>|
<a target="_blank" href="https://gongyi.jd.com/">京东公寓</a>|
<a target="_blank" href="https://www.jd.com/">English Site</a>
</div>
<p>Copyright © 2004-2018 京东JD.com 版权所有</p>
</div>
</body>
</html>
2.index.css代码
/*==============通用 ==============*/
*{
/*消除默认的margin*/
margin: 0;
/*消除默认的padding*/
padding: 0;
/*让所有标签的子标签都相对自己定位*/
position: relative;
}
/*==============顶部 ==============*/
#header{
height: 130px;
/*background-color: seagreen;*/
}
/*顶部的顶部*/
#header #top{
height: 80px;
background-color: white
}
#header #top div{
width: 292px;
/* background-color: hotpink;*/
/*相对定位->会让标签脱流*/
position: absolute;
left: 188px;
/*垂直居中*/
top: 50%;
margin-top: -30px;
line-height: 60px;
}
#header #top #survey{
position: absolute;
right: 20%;
bottom: 10px;
/*设置字体*/
color: #999999;
/*color: rgb(180,180,180);*/
font-size: 13px;
/*去掉下划线*/
text-decoration: none;
/*添加背景图
background:url(图片地址) repeat/no-repeat x y 背景颜色
x,y:x坐标和y坐标对应的值,除了可以设置数字值以外还可以设置center,让背景图在x方向和y方向居中
* */
padding-left: 23px;
background: url(../img/q-icon.png) no-repeat 0 center;
}
#header #top #survey:hover{
color: red;
text-decoration: underline;
}
/*顶部的底部*/
#header #bottom{
height: 50px;
background-color: rgb(255,246,236);
}
#header #bottom p{
/*垂直方向居中*/
height: 100%;
line-height: 50px;
/*水平方向居中*/
text-align: center;
/*设置字体*/
color: rgb(180,180,180);
font-size: 13px;
}
#header #bottom p img{
/*垂直居中*/
height: 25px;
position: absolute;
top: 50%;
margin-top: -12px;
}
#header #bottom p a{
color: rgb(30,30,30);
text-decoration: none;
}
#header #bottom p a:hover{
/*添加下划线*/
text-decoration: underline;
}
/*==============中间 ==============*/
#content{
height: 470px;
background:url(../img/background.jpg) no-repeat 42% center rgb(242,130,166)
}
#content #login_page{
width: 350px;
height: 430px;
background-color: white;
/*定位*/
position: absolute;
top: 10px;
right: 20%;
}
/*提示块*/
#content #login_page #div1{
height: 40px;
background-color: rgb(255,246,236);
}
#content #login_page #div1 img{
height: 16px;
position: absolute;
top: 50%;
margin-top: -8px;
line-height: 16px;
}
#content #login_page #div1 p{
/*垂直方向居中*/
height: 40px;
line-height: 40px;
font-size: 13px;
color: rgb(180,180,180);
/*水平方向居中*/
text-align: center;
}
/*设置登录方式*/
#content #login_page #div2{
height: 60px;
/* background-color: chartreuse;*/
color: rgb(220,220,220,0.5);
/*设置字体粗细:取值范围是100-900*/
font-weight: 100;
}
#content #login_page #div2 button{
width: 48.5%;
height: 100%;
border: none;
background: white;
color: rgb(100,100,100);
font-size: 18px;
}
/*设置按钮称为焦点的状态*/
#content #login_page #div2 button:focus{
color: red;
/*按钮成为焦点默认的边框效果是outline*/
outline: none;
}
/*信息收集块*/
#content #login_page #div3{
height: 280px;
/*设置边框*/
border-top: solid rgba(220,220,220,0.5) 1px;
border-bottom: solid rgba(220,220,220,0.5) 1px;
position: relative;
}
#content #login_page #div3 div{
width: 291px;
height: 40px;
margin-left: 8%;
margin-top: 22px;
border: solid rgb(170,170,170) 1px;
}
#content #login_page #div3 #username{
margin-top: 35px ;
}
/*图片*/
#content #login_page #div3 img{
width: 40px;
height: 40.5px;
float: left;
border-right: solid rgb(170,170,170) 1px;
}
/*输入框*/
#content #login_page #div3 input{
height: 40.5px;
width: 240px;
border: 0;
float: left;
padding-left: 10px;
font-size: 14px;
}
#content #login_page #div3 input:focus{
outline: none;
}
/*忘记密码*/
#content #login_page #div3 a{
position: absolute;
right: 8.5%;
margin-top: 20px;
color: rgb(89,89,89);
font-size: 13px;
text-decoration: none;
}
#content #login_page #div3 a:hover{
color: red;
text-decoration: underline;
}
/*登录按钮*/
#content #login_page #div3 button{
width: 291px;
margin-left: 8%;
height: 35px;
position: absolute;
bottom: 32px;
background-color: rgb(219,34,46);
border: none;
color: white;
font-size: 20px;
}
#content #login_page #div3 button:focus{
outline: none;
}
#content #login_page #div4{
height: 50px;
line-height: 50px;
font-size: 10px;
color: rgb(220,220,220);
}
#content #login_page #div4 #a1{
margin-left: 8%;
margin-right: 12px;
color: rgb(89,89,89);
font-size: 14px;
text-decoration: none;
background: url(../img/qq.png) no-repeat 0 center white;
padding-left: 25px;
}
#content #login_page #div4 #a2{
margin-left: 7px;
color: rgb(89,89,89);
font-size: 14px;
text-decoration: none;
background: url(../img/weixin.png) no-repeat 0 center white;
padding-left: 25px;
}
#content #login_page #div4 #a3{
position: absolute;
right: 9%;
color: rgb(165,19,23);
font-size: 14px;
text-decoration: none;
background: url(../img/right.png) no-repeat 0 center;
padding-left: 25px;
}
#content #login_page #div4 #a1:hover{
color: red;
text-decoration: underline;
}
#content #login_page #div4 #a2:hover{
color: red;
text-decoration: underline;
}
#content #login_page #div4 #a3:hover{
text-decoration: underline;
}
/*==============底部 ==============*/
#footer{
height: 105px;
/* background-color: gold;*/
}
#footer div{
height: 50px;;
/*水平居中*/
text-align: center;
/*垂直居中*/
line-height: 50px;
font-size: 13px;
color: rgb(89,89,89);
}
#footer div a{
margin-left: 10px;
margin-right: 10px;
font-size: 13px;
color: rgb(89,89,89);
text-decoration: none;
}
#footer div a:hover{
color: red;
text-decoration: underline;
}
#footer p{
text-align: center;
font-size: 13px;
color: rgb(89,89,89);
}