<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>139-网易注册界面搭建</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
}
a{
text-decoration: none;
font-size: 12px;
color: #ccc;
}
.header{
width: 960px;
height: 80px;
/*background-color: red;*/
margin: 0 auto;
padding: 18px;
}
.header .logo{
width: 644px;
height: 34px;
background: url("1.png") no-repeat 0 0;
float: left;
}
.header .logo a{
width: 130px;
height: 27px;
/*background-color: blue;*/
display: inline-block;
}
.header .links{
float: right;
width: 200px;
height: 27px;
/*background-color: red;*/
text-align: right;
}
.header .links a{
/*去掉文本超链接*/
/*text-decoration: none;*/
/*font-size: 12px;*/
/*color: #ccc;*/
line-height: 27px;
/*background-color: yellow;*/
text-align: right;
}
.content{
width: 960px;
height: 600px;
/*background-color: green;*/
margin: 0 auto;
}
.content .top{
width: 960px;
height: 38px;
/*background-color: red;*/
background: url("2.png") repeat-x;
}
/*设置content上部分左边的圆角*/
.content .left{
width: 960px;
height: 38px;
background: url("3.png") no-repeat left 0;
}
/*利用图像合成,设置content上部分右边的圆角*/
.content .right{
width: 960px;
height: 38px;
background: url("4.png") no-repeat right;
}
.content .right h1{
color: white;
font-size: 12px;
line-height: 38px;
/*空两个字*/
text-indent: 2em;
}
.content .bottom{
width: 960px;
height: 562px;
/*background-color: blue;*/
}
.content .bottom .article{
width: 642px;
height: 562px;
background-color: #f8f8f8;
float: left;
padding-top: 50px;
padding-left: 80px;
box-sizing: border-box;
border: 1px solid #f9f9f9;
border-top:none;
}
/*选项卡或者导航条,一定要想到ul,li标签*/
.content .bottom .article .articleTop{
width: 560px;
height: 60px;
/*background-color: yellow;*/
}
.content .bottom .article .articleTop ul{
/*去掉ul的小圆点*/
list-style: none;
width: 412px;
height: 34px;
/*background-color: tomato;*/
}
.content .bottom .article .articleTop ul li{
float: left;
width: 137px;
height: 34px;
/*background-color: skyblue;*/
/*垂直居中*/
line-height: 34px;
/*水平居中*/
text-align: center;
background: url("7.png") no-repeat left 0;
}
.content .bottom .article .articleBottom{
width: 560px;
height: 273px;
/*background-color: green;*/
}
.content .bottom .article .articleBottom .line{
width: 413px;
height: 28px;
/*background-color: yellow;*/
}
.content .bottom .article .articleBottom .line .star{
color: red;
/*span有默认宽度,设置为0就不剂了*/
width: 0;
}
.content .bottom .article .articleBottom .line span{
float: left;
height: 28px;
width: 60px;
/*background-color: pink;*/
font-size: 12px;
line-height: 28px;
text-align: right;
}
.content .bottom .article .articleBottom .line div{
float: right;
height: 28px;
width: 333px;
/*background-color: skyblue;*/
}
.content .bottom .article .articleBottom .line input{
width: 214px;
height: 24px;
}
.content .bottom .article .articleBottom .line .special{
width: 325px;
}
.content .bottom .article .articleBottom .line select{
width: 95px;
height: 28px;
}
.content .bottom .article .articleBottom .line img{
width: 100px;
height: 28px;
float: left;
}
.content .bottom .article .articleBottom .line .codeInput{
/*在企业开发中想让多个盒子定部对齐,我们让多个盒子同时浮动*/
margin-right: 10px;
float: left;
}
.content .bottom .article .articleBottom p{
font-size: 12px;
margin-left: 80px;
line-height: 28px;
}
.content .bottom .article .articleBottom input[type=submit]{
width: 119px;
height: 37px;
background: url("10.png") no-repeat;
border: none;
font-size: 15px;
color: white;
margin-left: 80px;
margin-top: 20px;
}
.content .bottom .aside{
width: 318px;
height: 562px;
/*background-color: tomato;*/
float: right;
padding-top: 105px;
padding-left: 66px;
box-sizing: border-box;
/*取色器取色*/
background-color: #f4f4f4;
border: 1px solid #ccc;
border-top:none;
border-top: none;
}
.footer{
width: 960px;
height: 48px;
/*background-color: yellow;*/
/*居中设置*/
margin: 0 auto;
line-height: 48px;
}
.footer p{
font-size:12px;
color: #ccc;
text-align: center;
}
</style>
</head>
<body>
<!--header区域-->
<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>
<!--content区域-->
<div class="content">
<!-- 中间上部 -->
<div class="top">
<div class="left">
<div class="right">
<h1>欢迎注册网易邮箱!邮件地址可以登录使用其他网易旗下产品。
</h1>
</div>
</div>
</div>
<!-- 中间下部 -->
<div class="bottom">
<!-- 中间下部左 -->
<div class="article">
<!--中间下部左上-->
<div class="articleTop">
<!--导航条-->
<ul>
<li>注册字母邮箱</li>
<li>注册手机号码邮箱</li>
<li>注册VIP邮箱</li>
</ul>
</div>
<!--中间下部左下-->
<div class="articleBottom">
<!--第一行表单-->
<div class="line">
<span><span class="star">*</span>邮件地址</span>
<div>
<input type="text" value="建议使用手机号码注册">@<select name="" id="">
<option value="163.com">163.com</option>
<option value="126.com">126.com</option>
<option value="lnj.net">lnj.net</option>
</select>
</div>
</div>
<p>6~18个字符,可使用字母、数字、下划线,需以字母开头</p>
<!--第二行表单元素-->
<div class="line">
<span><span class="star">*</span>密码</span>
<div>
<input type="password" class="special">
</div>
</div>
<p>6~16个字符,区分大小写</p>
<!--第三行表单元素-->
<div class="line">
<span><span class="star">*</span>确认密码</span>
<div>
<input type="password" class="special">
</div>
</div>
<p>请再次填写密码</p>
<!--第四行表单元素-->
<div class="line">
<span><span class="star">*</span>手机号码</span>
<div>
<input type="password" class="special">
</div>
</div>
<p>忘记密码时,可以通过该手机号码快速找回密码</p>
<!--最后一行-->
<div class="line">
<span><span class="star">*</span>验证码</span>
<div>
<input type="text" class="codeInput">
<img src="9.png" alt="">
</div>
</div>
<p>请填写图片中的字符,不区分大小写</p>
<p>
<input type="checkbox" checked="checked">
同意
<a href="#">"服务条款"</a>
和
<a href="#">"隐私权相关政策"</a>
</p>
<input type="submit" value="立即注册">
</div>
</div>
<!-- 中间下部右 -->
<div class="aside">
<img src="5.png" alt="">
</div>
</div>
</div>
<!--footer区域-->
<div class="footer">
<p>
<a href="#">关于网易</a>
<a href="#">关于网易免费邮</a>
<a href="#">邮箱官方博客</a>
<a href="#">客户服务</a>
<a href="#">隐私政策</a>
| 网易公司版权所有 © 1997-2019
</p>
</div>
</body>
</html>
运行结果(由于背景图太小,显示不太好看)