CSS Animated Gradient Background

plaintext 1 views 2 hours, 20 minutes ago Public
Raw Download
plaintext 1045 characters
/* Animated Gradient Background */
/* Add this to your CSS for a beautiful animated gradient */

body {
    background: linear-gradient(
        -45deg,
        #ee7752,
        #e73c7e,
        #23a6d5,
        #23d5ab
    );
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    min-height: 100vh;
}

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

/* Dark mode version */
.dark-gradient {
    background: linear-gradient(
        -45deg,
        #1a1a2e,
        #16213e,
        #0f3460,
        #533483
    );
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
}

/* Glassmorphism card on gradient */
.glass-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 2rem;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
}