
Glassmorphism Login Form
Step 1) Add HTML
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>GLASSMORPHISM LOGIN FORM</title>
<style>
:root {
--color: rgba(255, 255, 255, 0.3);
}
body {
height: 100vh;
background: linear-gradient(45deg, rgb(248, 15, 140), rgb(0, 98, 255));
}
.container {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
form {
background: var(--color);
padding: 3em;
height: 300px;
border-radius: 20px;
border-top: 1px solid var(--color);
border-left: 1px solid var(--color);
backdrop-filter: blur(10px);
display: flex;
flex-direction: column;
align-items: center;
position: relative;
box-shadow: 20px 20px 40px -8px rgba(0, 0, 0, 0.2);
}
p {
font-family: 'Montserrat', sans-serif;
font-weight: 500;
opacity: 0.8;
color: #fff;
margin-top: 0;
margin-bottom: 60px;
font-size: 1.5rem;
text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}
input {
background: transparent;
border: none;
width: 200px;
padding: 1em;
margin-bottom: 2em;
color: #fff;
border-top: 1px solid var(--color);
border-left: 1px solid var(--color);
border-radius: 500px;
backdrop-filter: blur(5px);
box-shadow: 4px 4px 40px rgba(0, 0, 0, 0.2);
font-family: Montserrat, sans-serif;
font-weight: 500;
transition: all 0.2s ease-in-out;
text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
outline: none;
}
input:hover {
background: rgba(255, 255, 255, 0.5);
box-shadow: 4px 4px 30px 8px rgba(0, 0, 0, 0.2);
}
input[type='email']:focus,
input[type='password']:focus {
background: rgba(255, 255, 255, 0.1);
box-shadow: 4px 4px 20px 8px rgba(0, 0, 0, 0.2);
}
input[type='button'] {
margin-top: 10px;
width: 150px;
font-size: 1rem;
}
input[type='button']:hover {
cursor: pointer;
}
input[type='button']:active {
background-color: rgba(255, 255, 255, 0.1);
}
input::placeholder {
font-family: Montserrat, sans-serif;
color: #fff;
font-weight: 400;
text-shadow: 2px 2px 4px rgba(255, 255, 255, 0.2);
}
.box {
background: var(--color);
backdrop-filter: blur(10px);
border-top: 1px solid var(--color);
border-left: 1px solid var(--color);
border-radius: 10px;
position: absolute;
box-shadow: 10px 10px 30px -8px rgba(255, 255, 255, 0.2);
}
.box-1 {
height: 70px;
width: 70px;
top: -30px;
left: -30px;
}
.box-2 {
height: 120px;
width: 120px;
top: -30px;
left: 250px;
z-index: -1;
}
.box-3 {
height: 70px;
width: 70px;
top: 80px;
left: 100px;
z-index: -1;
}
.box-4 {
height: 110px;
width: 110px;
top: 330px;
left: -30px;
z-index: -1;
}
.box-5 {
height: 130px;
width: 130px;
top: 300px;
left: 250px;
}
</style>
</head>
<body>
<div class="container">
<form action="#">
<p>Login</p>
<input type="email" placeholder="Email">
<input type="password" placeholder="Password">
<input type="button" value="Submit">
</form>
<div class="boxes">
<div class="box box-1"></div>
<div class="box box-2"></div>
<div class="box box-3"></div>
<div class="box box-4"></div>
<div class="box box-5"></div>
</div>
</div>
</body>
</html>
Watch on Youtube
Post a Comment