Cool Login Page in HTML + CSS [CODE]

Here is Coding Cool Login Page in HTML + CSS

Cool Login Page in HTML + CSS [CODE]

CODE:

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Modern Login Page</title>
  <style>
    body {
      margin: 0;
      height: 100vh;
      display: flex;
      justify-content: center;
      align-items: center;
      background: linear-gradient(135deg, #0f172a, #1e293b, #334155);
      background-size: 300% 300%;
      animation: bgAnimation 8s infinite alternate;
      font-family: Arial, sans-serif;
    }
    @keyframes bgAnimation {
      0% { background-position: left; }
      100% { background-position: right; }
    }
    .login-box {
      background: rgba(30, 41, 59, 0.9);
      padding: 40px;
      border-radius: 20px;
      box-shadow: 0 10px 30px rgba(0,0,0,0.6);
      width: 320px;
      text-align: center;
      animation: popUp 1s ease forwards;
      transform: scale(0.9);
    }
    @keyframes popUp {
      from { transform: scale(0); opacity: 0; }
      to { transform: scale(1); opacity: 1; }
    }
    .login-box h2 {
      margin-bottom: 20px;
      color: #f8fafc;
      font-size: 1.8rem;
    }
    .input-box {
      position: relative;
      margin-bottom: 20px;
    }
    .input-box input {
      width: 100%;
      padding: 12px;
      background: #0f172a;
      border: none;
      outline: none;
      border-radius: 10px;
      color: #f1f5f9;
      font-size: 1rem;
      box-shadow: inset 0 4px 10px rgba(0,0,0,0.5);
    }
    .input-box input::placeholder {
      color: #94a3b8;
    }
    .btn {
      width: 100%;
      padding: 12px;
      border: none;
      border-radius: 10px;
      background: #10b981;
      color: #fff;
      font-size: 1rem;
      cursor: pointer;
      transition: 0.3s;
      box-shadow: 0 4px 0 #047857, 0 6px 15px rgba(0,0,0,0.4);
    }
    .btn:hover {
      background: #059669;
    }
    .btn:active {
      transform: translateY(3px);
      box-shadow: 0 2px 0 #047857, 0 3px 10px rgba(0,0,0,0.3);
    }
    .extra-links {
      margin-top: 15px;
    }
    .extra-links a {
      color: #38bdf8;
      text-decoration: none;
      font-size: 0.9rem;
    }
    .extra-links a:hover {
      text-decoration: underline;
    }
  </style>
</head>
<body>
  <div class="login-box">
    <h2>Login</h2>
    <div class="input-box">
      <input type="text" placeholder="Username">
    </div>
    <div class="input-box">
      <input type="password" placeholder="Password">
    </div>
    <button class="btn">Login</button>
    <div class="extra-links">
      <a href="#">Forgot Password?</a><br>
      <a href="#">Create Account</a>
    </div>
  </div>
</body>
</html>

Share

What's Your Reaction?

Like Like 0
Dislike Dislike 0
Love Love 0
Funny Funny 0
Angry Angry 0
Sad Sad 0
Wow Wow 0