Hey! Frontend Web Developers In this post we will make a Glassmorphism Login Page With Pure HTML & CSS. We will also see the key concepts that are used to make this project like the glassmorphism effect, border radius, etc. That will help you to make such cool projects.
Also Read: Sliding Login & Sign Up Form
These key concepts will help you to make more cool projects & level up your frontend developer skills. At the end post, I will provide the entire HTML & CSS code so that you can run this on your local machine.
<form action="">
<h2>Login</h2>
<input type="text" placeholder="Username" />
<input type="password" placeholder="Password" />
<div class="rememberBox">
<input type="checkbox" id="check" />
<label for="check">Remember me</label>
<a href="#">Forgot Password?</a>
</div>
<button class="submitBtn">Login</button>
<p>Don't have an account? <a href="#">Register Now</a></p>
HTML:
<form action="">
<h2>Login</h2>
<input type="text" name="" id="" placeholder="Username" />
<input type="password" name="" id="" placeholder="Password" />
<div class="rememberBox">
<div>
<input type="checkbox" name="" id="check" />
<label for="check">Remember me</label>
</div>
<a href="#">Forgot Password?</a>
</div>
<button class="submitBtn">Login</button>
<p>Don't have an account? <a href="#">Register Now</a></p>
</form>
CSS:
<style>
* {
padding: 0;
margin: 0;
box-sizing: border-box;
font-family: Arial, Helvetica, sans-serif;
color: #fff;
}
body {
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
background-image: url(https://wallpapercave.com/wp/wp8828769.jpg);
background-position: center;
background-size: cover;
background-repeat: no-repeat;
}
form {
display: flex;
flex-direction: column;
align-items: center;
gap: 30px;
width: 400px;
height: fit-content;
padding: 50px 30px;
background: transparent;
border: rgba(255, 255, 255, 0.2) 2px solid;
box-shadow: rgba(0, 0, 0, 0.2);
border-radius: 15px;
backdrop-filter: blur(20px);
}
form h2 {
margin-bottom: 20px;
}
form > input {
width: 100%;
border: #ffffff84 1px solid;
background: none;
padding: 15px 25px;
outline: none;
border-radius: 25px;
}
form > input::placeholder {
color: #fff;
}
.rememberBox {
display: flex;
justify-content: space-between;
width: 100%;
}
.rememberBox > div {
display: flex;
gap: 5px;
}
.rememberBox > div input {
accent-color: #fff;
}
.submitBtn {
width: 100%;
padding: 15px 25px;
border: none;
background: #fff;
color: #000;
border-radius: 25px;
font-weight: bold;
cursor: pointer;
}
a {
text-decoration: none;
}
p a {
font-weight: 600;
}
</style>
Last Updated: June 18, 2024