HTML部分
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<link rel="stylesheet" href="./dwnglv.css">
</head>
<body>
<div class="box">
<img src="./img/2.png" alt="" class="img1">
<div class="dec">
<span class="zi">会员登录</span>
<span class="z2">立即注册</span>
<span class="z3">",享积分换礼、返现等专属优惠!"</span>
</div>
<div class="line"></div>
<div class="radio">
<input type="radio" name="c" id="b">
<label for="b" class="lab1">普通登录</label>
<input type="radio" name="c" id="a">
<label for="a" class="lab2">手机动态登录</label>
<div>
<input type="text" class="user" placeholder="请输入手机号/邮箱注册">
<input type="text" class="pwd" placeholder="请输入密码">
</div>
<div class="yzm">
<input type="text" class="yzm-input" placeholder="请输入验证码">
<div class="yzm-img">
<img src="./img/5.png" alt="">
</div>
<span>换一换</span>
</div>
<div class="jizhu">
<input type="chekbox" id="e">
<label for="e">30天内自动等率</label>
<span>忘记密码</span>
</div>
<div class="login">登 录</div>
</div>
<div class="line2"></div>
<div class="dec2">
您也可以用合作网站的帐号登录去i旅行网
</div>
<div class="tu">
<img src="./img/6.png" alt="">
</div>
</div>
</body>
</html>
*{
margin: 0;
padding: 0;
css属性
*{
margin: 0;
padding: 0;
}
.fl{
float: left;
}
.clear::after{
content: '';
display: block;
clear: both;
}
html,body{
font-size: 12px;font-family: '宋体';height: 100%;
width: 100%;
}
body{
background: url(./img/1.jpg) no-repeat;
background-size: 100% 100%;
overflow: hidden;
}
.box{
width: 500px;
height: 650px;
background-color: #eee;
margin: 10px auto;
position: relative;
overflow: hidden;
}
.img1{
position: absolute;
left: 396px;
}
.dec{
width: 400px;
height: 23px;
margin: 77px auto 9px;
}
.zi{
font-size: 24px;
color: #131313;
}
/* hack css的兼容 父级没有padding border */
.z2{
margin-left: 40px;
color: #1a479c;
}
.z3{
color: #131313;
}
.line{
width: 450px;
height: 2px;
border: solid 1px #cccccc;
margin: 0 auto;
background-color: #ccc;
}
.radio{
margin-top: 39px;
}
#a{
width: 16px;
height: 16px;
vertical-align: text-bottom;
margin-left: 126px;
}
#b{
width: 16px;
height: 16px;
vertical-align: text-bottom;
margin-left: 56px;
}
.lab1{
font-size: 16px;
color: #000;
cursor: pointer;
margin-left: 9px;
}
.lab2{
font-size: 12px;
color: #ccc;
cursor: pointer;
margin-left: 9px;
}
.user{
background: url(./img/3.png) 10px center no-repeat;
width: 380px;
height: 40px;
border: 1px solid #aaaa;
background-color: #fff;
padding-left: 69px;
margin:35px auto 29px ;
display: block;
box-sizing: border-box;
}
.pwd{
background: url(./img/4.png) 10px center no-repeat;
width: 380px;
height: 40px;
border: 1px solid #aaaa;
background-color: #fff;
padding-left: 69px;
margin:0px auto 29px ;
display: block;
box-sizing: border-box;
}
.yzm {
display: flex;
}
.yzm-input{
width: 180px;
height: 40px;
border:1px solid #aaa;
outline: none;
background: #fff;
padding-left:20px;
box-sizing: border-box;
margin-left:60px;
}
.yzm-img{
width: 150px;
height: 40px;
border: solid 1px #aaaaaa;
margin-left:50px;
}
.yzm-img img{
width: 100%;
height: 100%;
display: block;
}
.yzm span{
color:#1a479c;
font-size: 14px;
line-height: 40px;
margin-left:9px;
}
#e{width: 14px;
height: 10px;
margin-left: 60px;
margin-top: 33px;
}
.jizhu label{
font-size: 14px;
color: #000;
}
.jizhu span{
color: #1a479c;
font: 14px;
margin-left: 188px;
}
.login{
width: 380px;
height: 45px;
background-color: #f19149;
margin: 25px auto 30px;
border: 2px solid #f5b381;
font-size: 24px;
color: #fff;
text-align: center;
line-height: 45px;
}
.login:hover{
background-color: #eb6100;
cursor: pointer;
}
.line2{
width: 500px;
height: 1px;
background-color: beige;
}
.dec2{
font-family: SimSun;
font-size: 14px;
color: #1a479c;
margin-top: 13px;
margin-left: 35px;
}
.tu{
margin-top: 26px;
margin-left: 60px;
}