-
CSS Flip Animated Login Form
HTML
CSS
JavaScript
Welcome Back
Login
Don't have an account?
Sign Up
Create Account
Register
Already have an account?
Login here
* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Segoe UI', sans-serif; } body { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); display: flex; justify-content: center; align-items: center; min-height: 100vh; overflow: hidden; } .main-container { perspective: 1000px; } #flip-toggle { display: none; } .flip-card { width: 380px; height: 380px; position: relative; } .flip-card-inner { position: relative; width: 100%; height: 100%; text-align: center; transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275); transform-style: preserve-3d; } #flip-toggle:checked + .flip-card .flip-card-inner { transform: rotateY(180deg); } /* 3. Front and Back Faces */ .flip-front, .flip-back { position: absolute; width: 100%; height: 100%; backface-visibility: hidden; background-color: #ffffff; border-radius: 20px; padding: 40px; box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2); display: flex; flex-direction: column; justify-content: center; } .flip-back { transform: rotateY(180deg); } h2 { color: #333; margin-bottom: 25px; font-size: 28px; } .input-group { margin-bottom: 20px; text-align: left; } input { width: 100%; padding: 12px 15px; border: 1px solid #ddd; border-radius: 8px; outline: none; transition: border-color 0.3s; } input:focus { border-color: #667eea; } .btn { width: 100%; padding: 12px; background: #667eea; color: white; border: none; border-radius: 8px; font-size: 16px; font-weight: bold; cursor: pointer; transition: background 0.3s; margin-top: 10px; } .btn:hover { background: #764ba2; } .switch-text { margin-top: 25px; font-size: 14px; color: #666; } .switch-text label { color: #667eea; font-weight: bold; cursor: pointer; text-decoration: underline; }
Live Preview