Animated Gradient Generator
Create smooth animated CSS gradients with adjustable speed and colors. Perfect for hero sections, live wallpapers and eye-catching landing pages.
Colors
Animated Gradient CSS
What Is an Animated Gradient?
An animated gradient is a CSS gradient whose background position or size is animated over time, creating a smooth, constantly-shifting color transition. It adds motion and life to otherwise static backgrounds — used by landing pages, hero sections, mobile apps, login screens and live wallpaper apps.
How Animated Gradients Work
The most common technique is to make the gradient larger than the container and animate its background position from 0% to 100%:
.animated-gradient {
background: linear-gradient(270deg, #155EEF, #7C3AED, #0EA5E9);
background-size: 600% 600%;
animation: gradientShift 8s ease infinite;
}
@keyframes gradientShift {
0% { background-position: 0% 50%; }
50% { background-position: 100% 50%; }
100% { background-position: 0% 50%; }
}
By making the gradient 600% larger than the container and animating the background-position, the visible portion of the gradient slowly shifts across the full color range — creating a smooth, continuous animation.
Performance Considerations
- Prefer background-position animation: It is cheaper than animating opacity or transform on separate elements.
- Use
will-change: background-position: Hints the browser to prepare for animation, but use sparingly (it consumes GPU memory). - Respect
prefers-reduced-motion: Disable the animation for users who prefer reduced motion. - Avoid heavy blur overlays: Combining animated gradients with large blurs can cause performance issues on low-end devices.
When to Use Animated Gradients
- Landing page hero sections: Adds movement and visual interest above the fold.
- Login and onboarding screens: Warm, inviting first impressions.
- Mobile app splash screens: Modern, memorable first frames.
- Music and event pages: Ambient background energy.
- Loading screens: Animated gradients suggest activity better than static loaders.