Login & Sign up form – Form html css
<!DOCTYPE html>
<html lang=”en”>
<head>
<title>Login/Signup</title>
<style>
body {
font-family: sans-serif;
background: #1f2029;
color: #c4c3ca;
margin: 0;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
}
a { color: #c4c3ca;
text-decoration: none;
transition: color 0.3s;
}
a:hover {
color: #ffeba7;
}
.section {
position: relative;
width: 100%;
max-width: 440px;
perspective: 1000px;
}
.card {
position: relative;
width: 100%;
height: 400px;
transform-style: preserve-3d;
transition: transform 0.6s;
}
.checkbox {
display: none;
}
.checkbox:checked ~ .card {
transform: rotateY(180deg);
}
.card-face {
position: absolute;
width: 100%;
height: 100%;
background: #2a2b38;
border-radius: 8px;
backface-visibility: hidden;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding: 20px;
}
.card-back {
transform: rotateY(180deg);
}
h4 {
color: #ffeba7;
margin-bottom: 20px;
}
.form-group {
width: 100%;
margin-bottom: 15px;
position: relative;
}
.form-style {
width: 100%;
padding: 10px;
border: none;
border-radius: 4px;
background: #1f2029;
color: #c4c3ca;
outline: none;
}
.form-style:focus {
box-shadow: 0 0 8px
rgba(255, 235, 167, 0.5);
}
.btn {
background: #ffeba7;
color: #102770;
border: none;
padding: 10px 20px;
border-radius: 4px;
text-transform: uppercase;
cursor: pointer;
transition: background 0.3s;
}
.btn:hover {
background: #102770;
color: #ffeba7;
}
label {
display: block;
text-align: center;
margin: 15px 0;
cursor: pointer;
}
</style>
</head>
<body>
<div class=”section”>
<input type=”checkbox” id=”toggle” class=”checkbox”>
<label for=”toggle”>Log In | Sign Up</label>
<div class=”card”>
<div class=”card-face card-front”>
<h4>Log In</h4>
<div class=”form-group”>
<input type=”email” class=”form-style” placeholder=”Your Email”>
</div>
<div class=”form-group”>
<input type=”password” class=”form-style” placeholder=”Your Password”>
</div>
<button class=”btn”>Submit</button>
<a href=”#”>Forgot your password?</a>
</div>
<div class=”card-face card-back”>
<h4>Sign Up</h4>
<div class=”form-group”>
<input type=”text” class=”form-style” placeholder=”Your Full Name”>
</div>
<div class=”form-group”>
<input type=”email” class=”form-style” placeholder=”Your Email”>
</div>
<div class=”form-group”>
<input type=”password” class=”form-style” placeholder=”Your Password”>
</div>
<button class=”btn”>Submit</button>
</div>
</div>
</div>
</body>
</html>