39,118
社区成员




<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<style type="text/css">
*{
margin:0px;
padding:0px;
font-family:"microsoft yahei";
}
}
html,body{
background-image:url(./img/login_bg.jpg);
background-size:100% 100%;
height:100%;
}
.login{
position:absolute;
background-color:rgba(255,255,255,1);
top:25%;
left:60%;
right:10%
bottom:25%;
border-radius:5px;
}
.title{
top: 0%;
bottom: 76%;
text-align: center;
font-size: 25px;
font-weight: bold;
padding-top: 10px;
box-sizing: border-box;
}
.title,.u,.p,.l,.tips{
position: absolute;
width: 100%;
}
.input{
height:35px;
border:0px;
border-radius: 5px;
width: 80%;
padding-left:20px;
box-sizing:border-box;
}
.uname{
background: url(img/login_user.png) no-repeat left;
background-color: #F2F2Fa;
}
.pwd{
background: url(img/login_pwd.png) no-repeat left;
background-color: #F2F2Fa;
}
.button{
backgroud-color: #467F16;
height: 35px;
width: 80%;
border: 0px;
border-radius: 5px;
color: #FFF;
font-size: 16px;
}
.u{
top: 20%;
bottom: 60%;
left: 10%;
}
.p{
top: 40%;
bottom: 40%;
left: 10%;
}
.s{
top:50%;
bottom:30%;
left:10%;
.l{
top: 60%;
bottom: 20%;
left: 10%;
}
.tips{
top: 80%;
font-size:14px;
color:#AAAAAA;
text-align: center;
}
</style>
当图片作为背景图片时,需要确定宽高,就是说当前元素一定要有宽高的确定值
因为你没有发body部分的代码,所以我只能从css里看到这个问题