登录页面
代码
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>登录</title>
<link rel="stylesheet" href="..\font-awesome-4.7.0\css\font-awesome.css">
<link rel="stylesheet" href="登录界面.css">
</head>
<body>
<div id="login-box">
<h1>longin </h1>
<div class="form">
<div class="itme">
<i class="fa fa-user" aria-hidden="true"></i>
<input type="text" style="outline:none" placeholder="username">
</div>
<div class="itme">
<i class="fa fa-unlock-alt" aria-hidden="true"></i>
<input type="text" style="outline:none" placeholder="password">
</div>
<button style="outline:none">Login</button>
</div>
</div>
</body>
</html>
*{
margin: 0;
padding: 0;
}
body{
background: url("../图片/04.jfif");
background-repeat: no-repeat;
background-size: 100% auto;
}
#login-box{
width: 30%;
height: auto;
/*border: 1px solid #000; !*边框*!*/
margin: 0 auto; /*居中*/
margin-top: 15%; /*上下居中*/
text-align: center; /*内容居中*/
background: #00000060;
padding: 20px 50px;
}
/*#login-box .form{*/
/* margin-top: 50px;*/
/*}*/
#login-box .form .itme{
margin-top: 15px;
}
#login-box h1{
color: #ffffff;
}
#login-box .form .itme input{
width: 200px;
font-size: 18px;
border: 0;
border-bottom: 2px solid #fff;
padding: 5px 10px;
background: #ffffff00;
color: #fff;
}
#login-box button{
margin-top: 15px;
width: 180px;
height: 30px;
font-size: 20px;
font-weight: 700;
color: white;
/*background-image: linear-gradient(to right, #a8caba 0%, #5d4157 100%);*/
background-image: linear-gradient(to right, #2d266f 0%, #7c2289 100%);
border-radius: 15px;
}
#login-box .form .itme i{
font-size: 18px;
color: #fff;
}