<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Document</title>
</head>
<style>
*{margin: 0;padding: 0;}
.login{
width:200px;
margin:10px;
padding:1px 8px 8px 8px;
background-color:#EBF3FA;
position:relative;
}
.ipt{
border:solid 1px #999;
border-radius:3px;
width:180px;
height:28px;
margin:10px auto;
display:block;
padding:3px 0 3px 10px;
}
::-webkit-input-placeholder,:-ms-input-placeholder { /* WebKit browsers */
color:#888;
font-size:14px;
}
:-moz-placeholder,::-moz-placeholder { /* Mozilla Firefox 4 to 18 */
color:#888;
opacity:1;
font-size:14px;
}
.ckb{
margin:0 0 0 4px;
border:#f00 solid 1px;
border-radius:2px;
background-color:#eee;
}
.lb{
display:inline-block;
font-size:12px;
line-height:1;
height:14px;
vertical-align:middle;
}
.a{
text-decoration:none;
color:#0A64AF;
font-size:12px;
position:absolute;
right:5px;
}
.btn{
display:block;
width:190px;
height:38px;
margin:12px auto;
background-image:url(http://img.mukewang.com/539a972b00013e9102280177.jpg);
background-repeat:no-repeat;
border:none;
outline:none;
}
.btn2{
background-position:0 -38px;
}
hr{
border-left:none;
border-right:none;
border-bottom:solid 1px #fff;
border-top:solid 1px #ddd;
width:190px;
margin:0 auto;
}
</style>
<body>
<div>
<input type="text" placeholder="邮箱/手机号/用户名">
<input type="password" placeholder="请输入密码">
<input type="checkbox" id="dl">
<label for="dl">下次自动登录</label>
<a href="#">忘记密码?</a>
<button type="submit" value="登录"></button>
<hr />
<button class="btn btn2" type="button" value="注册"></button>
</div>
</body>
</html>checkbox的css样式修改以后貌似没什么作用,还是没法做到和图上一模一样。
placeholder的对齐部分也有一点问题,希望有人能解答一下谢谢。
你打开调试工具一看就明白了 是不是CSS权重的问题