一个简单的CSS登录页
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<title>loginPage</title>
<style>
html{
height: 100%;
}
body{
background-image: linear-gradient(to top, #330867 0%, #30cfd0 100%);
margin: 0;
}
h2{
text-align: center;
color: white;
}
.box{
width: 400px;
height: 320px;
background-color: black;
border-radius: 10px;
margin: 0 auto;
margin-top: 10%;
padding: 30px;
opacity: 0.7;
}
.item{
height: 45px;
width: 100%;
color: #03e9f4;
border-bottom: 1px solid #fff;
margin-bottom: 40px;
position: relative;
}
.item input{
width: 100%;
height: 100%;
color: white;
}
.item input:focus+label,.item input:valid+label{
top: 0;
font-size: 12px;
color: white;
}
.item label{
position: absolute;
left: 0;
top: 12px;
transition: all 0.3s linear;
}
.btn{
width: 100px;
height: 40px;
border: 1px solid white;
border-radius: 10px;
color: #03e9f4;
padding: 10px 20px;
margin-left: 150px;
margin-top: 15px;
}
.btn:hover{
background-color: #03e9f4;
color: white;
box-shadow: 0 0 5px 0 #03e9f4,
0 0 25px 0 #03e9f4,
0 0 50px 0 #03e9f4,
0 0 100px 0 #03e9f4;
text-transform: uppercase;
}
input,button{
width: 100%;
height: 100%;
background-color: transparent;
outline: none;
border: none;
padding-top: 20px;
box-sizing: border-box;
}
</style>
</head>
<body>
<div class="box">
<h2>Login</h2>
<form action="">
<div class="item">
<input type="text" required>
<label>Username</label>
</div>
<div class="item">
<input type="password" required>
<label>Password</label>
</div>
<button class="btn">submit</button>
</form>
</div>
</body>
</html> 相关推荐
hellowzm 2020-08-18
AlisaClass 2020-07-19
周公周金桥 2020-09-06
zjuwangleicn 2020-09-04
大象从不倒下 2020-07-31
淡风wisdon大大 2020-06-06
黎豆子 2020-05-07
hilary0 2020-05-04
zhanghao 2020-04-21
MaureenChen 2020-04-21
xingguanghai 2020-03-13
nercon 2020-02-22
impress 2020-02-20
ajaxtony 2020-02-18
teresalxm 2020-02-18
福叔 2020-02-16
mituan 2020-01-17
NET追求者BLOG 2020-01-06