京東登錄界面效果圖
HTML文件代碼
<!--index.html是網(wǎng)站首頁(yè)對(duì)應(yīng)html文件-->
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<!--設(shè)置網(wǎng)頁(yè)標(biāo)題-->
<title>京東-歡迎登錄</title>
<!--設(shè)置網(wǎng)頁(yè)圖標(biāo)-->
<link rel="icon" type="image/ico" href="img/jd_logo.ico"/>
<!--導(dǎo)入樣式表-->
<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" >登錄頁(yè)面秀仲,調(diào)查問卷</a>
</div>
<!--====頂部的底部====-->
<div id="bottom">
<p><img src="img/warning.png"/>   依據(jù)《網(wǎng)絡(luò)安全法》,為保障您的賬戶安全和正常使用壶笼,請(qǐng)盡快完成手機(jī)號(hào)驗(yàn)證神僵! 新版<a target="_blank" >《京東隱私政策》</a>已上線,將更有利于保護(hù)您的個(gè)人隱私覆劈。</p>
</div>
</div>
<!--===================中間=====================-->
<div id="content">
<!--登錄框-->
<div id="login_page">
<!--提示塊-->
<div id="div1">
<p><img src="img/xx.png"/>  京東不會(huì)以任何理由要求您轉(zhuǎn)賬匯款保礼,謹(jǐn)防詐騙。</p>
</div>
<!--按鈕塊-->
<div id="div2">
<button id="btn1">掃碼登錄</button>|
<button id="btn2">賬號(hào)登錄</button>
</div>
<!--信息收集塊-->
<div id="div3">
<!--用戶名-->
<div id="username">
<img src="img/pygame.png"/>
<input type="text" name="uersname" placeholder="郵箱/用戶名/已驗(yàn)證手機(jī)" />
</div>
<!--密碼-->
<div id="password">
<img src="img/password_icon.png"/>
<input type="password" name="password" placeholder="密碼" />
</div>
<!--忘記密碼-->
<a >忘記密碼</a>
<!--登錄-->
<button>登 錄</button>
</div>
<!--注冊(cè)和第三方登錄-->
<div id="div4">
<a id="a1" class="aa" href="">QQ</a>|
<a id="a2" class="aa" href="">微信</a>
<a id="a3" href="">立即注冊(cè)</a>
</div>
</div>
</div>
<!--===================底部=====================-->
<div id="footer">
<div>
<a href="">關(guān)于我們</a>|
<a href="">聯(lián)系我們</a>|
<a href="">人才招聘</a>|
<a href="">商家入駐</a>|
<a href="">廣告服務(wù)</a>|
<a href="">手機(jī)京東</a>|
<a href="">友情鏈接</a>|
<a href="">銷售聯(lián)盟</a>|
<a href="">京東社區(qū)</a>|
<a href="">京東公益</a>|
<a href="">English Site</a>
</div>
<p>Copyright ? 2004-2018 京東JD.com 版權(quán)所有</p>
</div>
</body>
</html>
CSS文件代碼
/*==============(通用)================*/
*{
/*消除默認(rèn)的margin*/
margin: 0;
/*消除默認(rèn)padding*/
padding: 0;
/*讓所有標(biāo)簽的子標(biāo)簽都相對(duì)自己定位*/
position: relative;
}
/*===============頂部=================*/
#header{
height: 130px;
/*background-color: seagreen;*/
}
/*====頂部的頂部====*/
#header #top{
height: 80px;
background-color: white;
}
#header #top div{
width: 292px;
height: 60px;
/*相對(duì)定位-會(huì)讓標(biāo)簽脫流*/
position: absolute;
left: 188px;
/*垂直居中*/
top: 50%;
margin-top: -30px;
line-height: 60px;
}
#header #top #survey{
/*布局*/
position: absolute;
right: 187px;
bottom: 10px;
/*設(shè)置字體*/
color: rgb(180, 180, 180);
font-size: 12px;
/*去掉下劃線*/
text-decoration: none;
/*添加背景圖
* background:url(圖片地址) repeat/no-repeat x y 背景顏色
* x,y: x坐標(biāo)和y坐標(biāo)對(duì)應(yīng)的值责语,除了可以設(shè)置數(shù)字值以外炮障,和可以設(shè)置center,讓背景圖在x方向和y方向居中
*/
padding-left: 23px;
background:url(../img/q-icon.png) no-repeat 0 center white;
}
#header #top #survey:hover{
color: red;
text-decoration: underline;
}
/*====頂部的底部====*/
#header #bottom{
height: 50px;
background-color: rgb(255, 246, 236);
}
#header #bottom p{
/*垂直方向居中*/
height: 50px;
line-height: 50px;
/*水平方向居中*/
text-align: center;
/*設(shè)置字體*/
color: rgb(180, 180, 180);
font-size: 12px;
}
#header #bottom p img{
/*垂直居中*/
height: 25px;
position: absolute;
top: 50%;
margin-top: -12px;
line-height: 25px;
}
#header #bottom p a{
color: rgb(30, 30, 30);
/*去掉下劃線*/
text-decoration: none;
}
#header #bottom p a:hover{
/*添加下劃線*/
text-decoration: underline;
}
/*===============中間=================*/
#content{
height: 470px;
/*<!--77,157坤候,254-->*/
background: url(../img/bg2.png) no-repeat 15% center rgb(77, 157, 254);
}
/*====登錄界面=======*/
#content #login_page{
width: 350px;
height: 400px;
background-color: white;
/*定位*/
position: absolute;
right:200px;
top: 15px;
}
/*--提示塊--*/
#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;
/*水平方向居中*/
text-align: center;
font-size: 12px;
color: rgb(180, 180, 180);
}
/*--選中登錄方式--*/
#content #login_page #div2{
height: 60px;
/*background-color: chartreuse;*/
color: rgba(220, 220, 220, 0.6);
/*設(shè)置字體粗細(xì):取值范圍是100-900*/
font-weight: 100;
}
#content #login_page #div2 button{
width: 48%;
height: 100%;
border: 0;
font-size: 18px;
color: rgb(60, 60, 60);
}
/*設(shè)置按鈕成為焦點(diǎn)的狀態(tài)*/
#content #login_page #div2 button:focus{
color: red;
/*按鈕成為焦點(diǎn)默認(rèn)的邊框效果是outline*/
outline: 0;
}
/*--信息收集塊--*/
#content #login_page #div3{
height: 250px;
/*設(shè)置邊框*/
border-top: solid rgba(220, 220, 220, 0.6) 1px;
border-bottom: solid rgba(220, 220, 220, 0.6) 1px;
}
#content #login_page #div3 div{
width: 300px;
height: 40px;
margin-left: 25px;
margin-top: 23px;
border: solid rgb(170, 170, 170) 1px;
}
#content #login_page #div3 #username{
margin-top: 35px;
}
/*圖片*/
#content #login_page #div3 div img{
width: 40px;
height: 40px;
float: left;
border-right: solid rgb(170, 170, 170) 1px;
}
/*輸入框*/
#content #login_page #div3 div input{
height: 40px;
width: 245px;
border: 0;
float: left;
padding-left: 10px;
font-size: 14px;
}
#content #login_page #div3 div input:focus{
outline: 0;
}
/*忘記密碼*/
#content #login_page #div3 a{
position: absolute;
right: 25px;
margin-top: 20px;
color: rgb(89, 89, 89);
font-size: 12px;
text-decoration: none;
}
#content #login_page #div3 a:hover{
color: red;
text-decoration: underline;
}
/*登錄按鈕*/
#content #login_page #div3 button{
width: 300px;
margin-left: 25px;
height: 35px;
position: absolute;
bottom: 20px;
background-color: rgb(219, 34, 46);
border: none;
color: white;
font-size: 20px;
}
#content #login_page #div4{
/*垂直方向居中*/
height: 50px;
line-height: 50px;
font-size: 10px;
color: rgba(220,220,220,0.8);
}
#content #login_page #div4 #a1{
margin-left: 25px;
margin-right: 15px;
color: rgb(89,89,89);
font-size: 12px;
text-decoration: none;
padding-left: 25px;
background: url(../img/qq.png) no-repeat 0 center white;
}
#content #login_page #div4 #a2{
margin-left: 5px;
color: rgb(89,89,89);
font-size: 12px;
text-decoration: none;
padding-left: 25px;
background: url(../img/weixin.png) no-repeat 0 center white;
}
#content #login_page #div4 #a3{
position: absolute;
right: 25px;
color: rgb(165,19,23);
font-size: 12px;
text-decoration: none;
padding-left: 25px;
background: url(../img/right.png) no-repeat 0 center rgba(0,0,0,0);
}
#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;
}
#footer div{
height: 50px;
/*水平居中*/
text-align: center;
/*垂直居中*/
line-height: 50px;
font-size: 12px;
color: rgb(89, 89, 89);
}
#footer div a{
margin-left: 10px;
margin-right: 10px;
color: rgb(89, 89, 89);
text-decoration: none;
}
#footer div a:hover{
color: red;
text-decoration: underline;
}
#footer p{
color: rgb(89, 89, 89);
font-size: 12px;
/*水平居中*/
text-align: center;
}