一、html文件
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<!--設(shè)計(jì)網(wǎng)頁(yè)標(biāo)題-->
<title>京東-歡迎登錄</title>
<!--設(shè)置網(wǎng)頁(yè)圖標(biāo)-->
<link rel="icon" type="image/ico" href="img/aaa.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" >登錄界面,調(diào)查問(wèn)卷</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è)人隱私。</img>
</div>
</div>
<!--中間-->
<div id="content">
<!--登錄框-->
<div id="login_page">
<!--提示塊-->
<div id="div1">
<img src="img/xx.png"/>
<p>京東不會(huì)以任何理由要求您轉(zhuǎn)賬匯款,謹(jǐn)防詐騙。</p>
</div>
<!--按鈕塊-->
<div id="div2">
<button>掃碼登錄</button>|<button>賬號(hào)登錄</button>
</div>
<!--信息收集塊-->
<div id="div3">
<div>
<img src="img/pygame.png"/>
<input type="text" name="username" id="" value="" placeholder="郵箱/用戶名/已驗(yàn)證手機(jī)"/>
</div>
<div>
<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" >QQ</a>|
<a id="a2" >微信</a>
<a id="a3" >立刻注冊(cè)</a>
</div>
</div>
</div>
<!--底部-->
<div id="footer">
<div>
<a >關(guān)于我們</a>|
<a >聯(lián)系我們</a>|
<a >人才招聘</a>|
<a >商家入駐</a>|
<a >廣告服務(wù)</a>|
<a >手機(jī)京東</a>|
<a >友情鏈接</a>|
<a >銷售聯(lián)盟</a>|
<a >京東社區(qū)</a>|
<a >京東公益</a>|
<a >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: 100px;
background-color: beige;
}
/*頂部的頂部*/
#header #top{
height: 70px;
background-color:white;
}
#header #top div{
width: 300px;
height: 70px;
/*脫流*/
position: absolute;
left: 190px;
/*垂直居中*/
top: 50%;
margin-top: -30px;
line-height: 60px;
}
#header #top #survey{
/*布局*/
position: absolute;
right: 190px;
top: 40px;
/*去除下劃線*/
text-decoration: none;
/*文字顏色 大小*/
color:gray;
font-size: 12px;
/*添加背景圖
* background:url(圖片地址) (是否平鋪)repeat/norepeat x y 背景顏色
* x坐標(biāo)和y坐標(biāo)對(duì)應(yīng)的值,除了可以設(shè)置數(shù)字以外,也可以設(shè)置center,讓背景圖在x坐標(biāo)和有坐標(biāo)居中
* */
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: 30px;
background-color: rgb(255,248,240);
}
/*設(shè)置字的格式*/
#header #bottom p{
/*垂直方向居中*/
height:30px;
line-height: 30px;
/*水平方向居中*/
text-align: center;
/*設(shè)置字體大小*/
font-size: 12px;
}
#header #bottom p img{
/*垂直居中*/
height:16px;
position: absolute;
top: 30px;
margin-top:-22px ;
line-height: 15px;
}
/*中間*/
#content{
height: 430px;
background: url(../img/bg1.png)150px center no-repeat rgb(220,45,19);
}
/*登錄界面*/
#content #login_page{
width: 350px;
height: 350px;
background-color: white;
/*定位*/
position: absolute;
right: 150px;
top: 40px;
}
/*提示塊*/
#content #login_page #div1{
height:30px;
background-color: rgb(255,246,236);
}
#div1 img{
height: 16px;
position: absolute;
left: 24px;
top: 8px;
}
#div1 p{
height: 30px;
line-height: 30px;
font-size: 12px;
text-align: center;
color: darkgray;
}
#div1 a{
color: aqua;
text-decoration: none;
}
#div a:hover{
color: red;
text-decoration: underline;
}
/*選中登錄方式*/
#content #login_page #div2{
height: 50px;
background-color:white;
color: rgb(220,220,220,0.6);
/*設(shè)置求字體粗細(xì):取值范圍是100-900*/
font-weight: 100;
}
#div2 button{
width: 48%;
height: 100%;
border:0;
font-size: 20px;
background-color: white;
color:rgb(60,60,60);
}
/*設(shè)置按鈕成為焦點(diǎn)的狀態(tài)*/
#div2 button:focus{
color: red;
/*按鈕成為焦點(diǎn)默認(rèn)的邊款效果是outline*/
outline: 0;
}
/*信息收集塊*/
#content #login_page #div3{
height: 220px;
border-top: solid gainsboro 1px;
border-bottom: solid gainsboro 1px;
}
#div3 div{
width: 300px;
height: 40px;
margin-left: 25px;
margin-top: 23px;
border:solid black 1px ;
}
#div3 img{
width: 40px;
height: 40px;
float: left;
}
#div3 input{
width: 200px;
height: 40px;
float: left;
border: 0;
padding-left:10px ;
font-size: 14px;
}
#div3 input:focus{
outline:0;
}
/*忘記密碼*/
#div3 a{
position: absolute;
right: 25px;
margin-top: 10px;
color: rgb(89,89,89);
font-size: 12px;
text-decoration: none;
}
#div3 a:hover{
color: red;
text-decoration: underline;
}
/*登錄按鈕*/
#div3 button{
width: 300px;
margin-left: 25px;
margin-top:40px;
height: 35px;
position: absolute;
bottom: 20px;
background-color: red;
border: 0;
color: white;
font-size: 20px;
}
/**/
#content #login_page #div4{
/*垂直方向居中*/
height: 40px;
line-height: 40px;
font-size: 8px;
color: rgb(220,220,220,0.6);
}
#a1{
margin-left: 20px;
color: black;
font-size:14px ;
text-decoration: none;
background: url(../img/qq.png) no-repeat 0 center white;
padding-left: 25px;
margin-right: 20px;
}
#a2{
margin-left:20px ;
color: black;
font-size: 14px;
text-decoration: none;
background: url(../img/weixin.png) no-repeat 0 center white;
padding-left: 25px;
}
#a3{
position: absolute;
right: 25px;
color: rgb(165,19,23);
font-size: 14px;
text-decoration: none;
background: url(../img/right.png) no-repeat 0 center white;
padding-left: 25px;
}
#div4 #a1:hover{
color: red;
text-decoration: underline;
}
#div4 #a2:hover{
color: red;
text-decoration: underline;
}
#div4 #a3:hover{
color: red;
text-decoration: underline;
}
/*底部*/
#footer{
height: 100px;
color: darkgrey;
}
#footer div{
height: 50px;
background-color:;
/*垂直居中*/
text-align: center;
/*水平居中*/
line-height: 50px;
font-size: 14px;
color: darkgrey;
}
#footer div a{
margin-left: 15px;
margin-right: 15px;
color: darkgrey;
text-decoration: none;
}
#footer div a:hover{
color: red;
text-decoration: underline;
}
#footer p{
color: darkgray;
font-size: 14px;
text-align: center;
}
三、效果
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請(qǐng)結(jié)合常識(shí)與多方信息審慎甄別。
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡(jiǎn)書系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。