这是初期学习html和css的时候自己写的一个界面,当时做出来之后很有成就感,故在此纪念一下(代码冗余度很高!)
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>网易注册界面</title>
<style>
body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input,textarea,p,blockquote,th,td
{
margin:0;
padding:0
}
body{
background-color: #f8f8f8;
}
a{
text-decoration: none;
font-size: 12px;
line-height: 27px;
color: #989898;
}
/*头部*/
.header{
width: 960px;
height: 77px;
/*background-color: red;*/
margin: 0 auto;
padding-top:27px;
box-sizing: border-box;
}
.header .logo{
width: 644px;
height: 27px;
float: left;
background: url("images/glb.png") no-repeat 0 0;
}
.header .logo a{
/*display: inline-block;*/
float: left;
width: 130px;
height: 27px;
}
.header .links{
width: 200px;
height: 27px;
float: right;
text-align: right;
color: #989898;
}
/*内容*/
.content{
box-sizing:border-box;
width: 960px;
/*height: 600px;*/
height: 700px;
margin: 0 auto;
overflow: hidden;
}
.content .top{
box-sizing: border-box;
width: 960px;
height: 38px;
background: url("images/topcenter.png") repeat-x 0 0;
}
.content .left{
width: 960px;
height: 38px;
background: url("images/topleft.png") no-repeat left 0;
}
.content .right{
width: 960px;
height: 38px;
background: url("images/topright.png") no-repeat right 0;
}
.content .top h1{
font-family:"微软雅黑";
font-size: 14px;
line-height:38px;
color: #ffffff;
margin-left:20px;
}
.content .bottom{
box-sizing: border-box;
width: 960px;
height: 662px;
}
/*内容左侧注册界面*/
.content .bottom .contentBL{
width: 642px;
height: 662px;
box-sizing: border-box;
/*border-right: 2px solid #cbcbcb;*/
border-left: 1px solid #cbcbcb;
border-right: 1px solid #cbcbcb;
border-bottom: 1px solid #cbcbcb;
background-color: #fff;
float: left;
padding-top:50px;
padding-left: 80px;
}
.content .bottom .contentBL .contentBLTop{
width: 560px;
height: 60px;
}
.content .bottom .contentBL .contentBLTop ul{
width: 412px;
height: 34px;
background: url("images/tab.jpg") no-repeat left 0;
}
.content .bottom .contentBL .contentBLTop ul li{
list-style: none;
float: left;
line-height: 34px;
text-align: center;
width: 137px;
height: 34px;
color: #555;
font-size: 14px;
}
.content .bottom .contentBL .contentBLBottom{
width: 560px;
height: 551px;
/*background-color: green;*/
}
.content .bottom .contentBL .contentBLBottom .line{
width: 413px;
height: 60px;
}
.content .bottom .contentBL .contentBLBottom .line span{
width: 60px;
height: 28px;
float: left;
font-size: 13px;
line-height: 28px;
text-align: right;
}
.content .bottom .contentBL .contentBLBottom .line div input{
width: 212px;
height: 28px;
float: left;
color: #555;
font-size: 14px;
}
.content .bottom .contentBL .contentBLBottom .line div select{
width: 100px;
height: 32px;
float: right;
}
.content .bottom .contentBL .contentBLBottom .line p{
font-size: 12px;
color: #555;
/*text-align: center;*/
/*line-height: 28px;*/
}
.content .bottom .contentBL .contentBLBottom .line .name::before{
content: '*';
color: red;
}
.content .bottom .contentBL .contentBLBottom .line div{
width: 333px;
height: 28px;
line-height: 28px;
box-sizing: border-box;
float: right;
}
.content .bottom .contentBL .contentBLBottom .line div .init{
width: 329px;
height: 28px;
}
.content .bottom .contentBL .contentBLBottom .line div .yan{
width: 202px;
float: left;
}
.content .bottom .contentBL .contentBLBottom .line div .pic{
width: 110px;
font-size: 12px;
float: right;
}
.content .bottom .contentBL .contentBLBottom .line div .pic img{
width: 110px;
/*display: block;*/
}
.content .bottom .contentBL .contentBLBottom .bt{
width: 140px;
height: 30px;
margin-left: 80px;
margin-bottom:10px;
margin-top: 10px;
}
.content .bottom .contentBL .contentBLBottom .agree{
font-size: 12px;
color: #555;
line-height:20px;
margin-top: 10px;
margin-bottom: 10px;
margin-left:80px;
}
.content .bottom .contentBL .contentBLBottom input[type="submit"]{
width: 119px;
height: 37px;
background: url("images/glb.png") no-repeat -144px -360px;
border:none;
font-size: 20px;
color: white;
margin-left: 80px;
}
/*内容右侧广告界面*/
.content .bottom .contentBR{
width: 318px;
height: 662px;
background-color: #f4f4f4;
float: right;
border-left: 1px solid #cbcbcb;
border-right: 1px solid #cbcbcb;
border-bottom: 1px solid #cbcbcb;
box-sizing: border-box;
padding-top: 105px;
padding-left: 45px;
}
/*底部*/
.footer{
width: 960px;
height: 48px;
margin: 0 auto;
color: #999;
font-family:Verdana;
font-size: 12px;
text-align: center;
}
.footer a{
color: #999;
text-decoration: none;
}
.footer .pp{
display: inline;
line-height: 48px;
}
</style>
</head>
<body>
<!--头部-->
<div class="header">
<div class="logo">
<a href="#" title="网易163免费邮"></a><a href="#" title="网易126免费邮"></a><a href="#" title="网易Yeah.net免费邮"></a>
</div>
<div class="links">
<a href="#">了解更多</a>
|
<a href="#">反馈意见</a>
</div>
</div>
<!--内容-->
<div class="content">
<div class="top">
<div class="left">
<div class="right">
<h1>欢迎注册无限容量的网易邮箱!邮件地址可以登录使用其他网易旗下产品。</h1>
</div>
</div>
</div>
<!--注册-->
<div class="bottom">
<div class="contentBL">
<div class="contentBLTop">
<ul>
<li>注册字母邮箱</li>
<li>注册手机号码邮箱</li>
<li>注册VIP邮箱</li>
</ul>
</div>
<div class="contentBLBottom">
<div class="line">
<span class="name">邮件地址</span>
<div>
<input type="text" value="建议用手机号码注册">@<select>
<option value="163.com">163.com</option>
<option value="126.com">126.com</option>
<option value="yeah.net">yeah.net</option>
</select>
<p>6~18个字符,可使用字母、数字、下划线,需以字母开头</p>
</div>
</div>
<div class="line">
<span class="name">密码</span>
<div>
<input class="init" type="password">
<p>6~16个字符,区分大小写</p>
</div>
</div>
<div class="line">
<span class="name">确认密码</span>
<div>
<input class="init" type="password">
<p>请再次填写密码</p>
</div>
</div>
<div class="line">
<span class="name">手机号码</span>
<div>
<input class="init" type="text" value="+86-">
<p>忘记密码时,可以通过该手机号码快速找回密码</p>
</div>
</div>
<div class="line">
<span class="name">验证码</span>
<div>
<div class="yan">
<input type="text">
<p>请填写图片中的字符,不区分大小写</p>
</div>
<div class="pic">
![](images/call.jpg)
<a href="#">看不清楚?换张图片</a>
</div>
</div>
</div>
<button class="bt">免费获取验证码</button>
<div class="line">
<span class="name">短信码</span>
<div>
<input type="text" class="init">
<p>请查收手机短信,并填写短信中的验证码</p>
</div>
</div>
<div class="agree">
<p>
<input type="checkbox" checked="checked">
同意<a href="#">"服务条款"</a>和<a href="#">"隐私权相关政策"</a></p>
</div>
<div class="sub">
<input type="submit" value="立即注册">
</div>
</div>
</div>
<!--右边二维码-->
<div class="contentBR">
![](images/app.jpg)
</div>
</div>
</div>
<div class="footer">
<a href="#">关于网易</a>
<a href="#">关于网易免费邮</a>
<a href="#">邮箱官方博客</a>
<a href="#">客户服务</a>
<a href="#">隐私政策</a>
<div class="pp">|</div>
<div class="pp">网易公司版权所有 © 1997-2016</div>
</div>
</body>
</html>