html+css实现唯美简洁登录页面

1.简介
本案例是html和css实现的唯美简洁的登录界面。纯粹个人一时兴起所写。可以适用于个人博客登录以及其他系统的登录界面,登录title可以随时修改。
2.先看效果。
登录界面
3.上代码。
代码复制粘贴,修改里面的图片路径就可以直接运行。
4.html页面代码。

<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<title>唯美登录页面</title>
		<link rel="stylesheet" type="text/css" href="css/唯美登录页面.css" />
	</head>
	<body>
		<div class="bgWrapper"></div>
		<div class="loginWrapper">
			<p class="title">BlogLogin</p>
			<div class="inputWrapper">
				<label for="uname">用户名</label>
				<p class="user"><input type="text" name="" id="uname" value="" placeholder="UserId" /></p>
				<label for="ps">密码</label>
				<p class="pwd"><input type="password" name="" id="ps" value="" placeholder="Password" /></p>
				<p><button class="btn">Login</button></p>
			</div>
		</div>
		<div class="shadow"></div>
	</body>
</html>

5.css代码。

*{
	margin: 0px;
	padding: 0px;
}
body,html{
	width: 100%;
	height: 100%;
}
.bgWrapper{
	width: 100%;
	height: 100%;
	position: absolute;
	box-sizing: border-box;
	background: url(../img/loginBg.jpg);
}
.loginWrapper{
	min-width: 20%;
	min-height: 45%;
	position: absolute;
	top: 50%;
	margin-top: -14%;
	left: 50%;
	margin-left: -10%;
	z-index: 1000;
	background: rgba(0,0,0,0.2);
}

.shadow{
	width: 100%;
	height: 100%;
	position: absolute;
	box-sizing: border-box;
	background:rgba(0,0,0,0.7);
}
.title{
	line-height: 50px;
	text-align: center;
	margin-bottom: 100px;
	color: white;
	font-size: 25px;
	text-shadow: 1px 1px 1px deeppink;
}
.loginWrapper .inputWrapper{
	text-align: center;
	color: white;
	font-family:"微软雅黑";
	font-size: 15px;
	letter-spacing: 2px;
}
.user,.pwd{
	margin-top: 3px;
	margin-bottom: 25px;
}
#uname,#ps,.btn{
	display: block;
	margin: 0 auto;
	border: none;
	height: 40px;
	width: 250px;
	border-radius: 20px;
}
.btn{
	cursor: pointer;
	color: white;
	height: 40px;
	width: 250px;
	font-size: 18px;
	background: linear-gradient(to right,#0E0A6C,#ED17CA,#0E0A6C);
}

6.如有不足之处,欢迎在下方评论。一起学习进步,如对您有帮助,欢迎点个赞支持。