* {
box-sizing: border-box;
}
body{
background-image: linear-gradient(19deg, #21D4FD 0%, #B721FF 100%);
}
.box {
display: flex;
align-items: center;
justify-content: center;
height: 100vh;
}
.login-form {
min-width: 250px;
max-width: 400px;
border-radius: 24px;
padding: 15px;
background: #fff;
}
.login-form h1 {
text-align: center;
font-size: 2.5rem;
margin-top: 35px;
}
.login-form input[type = "text"] {
margin-top: 30px;
}
.login-form input[type = "password"] {
margin-top: 10px;
}
input {
outline: none;
}
.links {
margin-top: 10px;
display: flex;
flex-wrap: wrap;
flex-direction: row;
}
.links > a:first-of-type {
margin-right: 5px;
}
.login-form input[type = "submit"] {
background-color: #E0E0E0;
background-image: linear-gradient(19deg, #21D4FD 0%, #B721FF 100%);
width: 100%;
color: white;
border: none;
margin-top: 35px;
cursor: pointer;
padding: 10px;
font-family: 'Raleway', sans-seriff;
font-size: 1.3rem;
font-weight: bold;
border-radius: 24px;
transition: 0.25s;
}
.login-form input[type = "submit"]:hover {
opacity: 0.8;
}
.login-form input[type = "text"]:focus, .login-form input[type = "password"]:focus {
border: 2px #21D4FD solid;
}
.login-form input[type = "text"], .login-form input[type = "password"] {
width: 100%;
border: none;
border-radius: 24px;
font-size: 1rem;
font-family: 'Raleway', sans-seriff;
background-color: gainsboro;
padding: 15px;
}
Login Form with Gradient Button
A simple login form with a gradient button and basic validation for username and password.
You can remove CSS lines 5-7 if you do not want a gradient background. You can also change CSS line 74 if you want a different color for form validation.
';