Designing an Elegant Login Page with CSS and HTML

C++ Mastery
0

Login Page with CSS and HTML:

Introduction: In the world of web development, creating an intuitive and visually appealing login page is crucial for providing a seamless user experience. By combining the power of CSS and HTML, we can design a stunning login page that not only looks great but also functions flawlessly. In this blog post, we will explore step-by-step instructions on how to create an elegant login page using CSS and HTML.



<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Advanced Login Page</title>

    <style>
        body {
    font-family: Arial, sans-serif;
    background-color: #000;
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

.login-container {
    background-color: #111;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    padding: 30px;
    max-width: 400px;
    width: 80%;
}

h2 {
    text-align: center;
    margin-bottom: 20px;
    color: #fff;
}

form {
    display: flex;
    flex-direction: column;
}

label {
    font-weight: bold;
    margin-bottom: 5px;
    color: #fff;
}

input {
    padding: 10px;
    margin-bottom: 20px;
    border: 1px solid #555;
    border-radius: 5px;
    background-color: #333;
    color: #fff;
}

button {
    padding: 10px;
    background-color: #007BFF;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

button:hover {
    background-color: #0056b3;
}

@keyframes gradient-animation {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

body {
    background-image: linear-gradient(45deg, #ff4b1f,
#ff9068, #ff5e52, #d32ebe, #9013fe, #3b5bdb, #3288bd, #3298bd);
    background-size: 200% 200%;
    animation: gradient-animation 10s ease infinite;
}

    </style>
</head>
<body>
    <div class="login-container">
        <h2>Login</h2>
        <form>
            <label for="username">Username</label>
            <input type="text" id="username" name="username" required>
            <label for="password">Password</label>
            <input type="password" id="password" name="password" required>
            <button type="submit">Login</button>
        </form>
    </div>
</body>
</html>

Tags

Post a Comment

0Comments
Post a Comment (0)