# Animated Gradient

> A slowly shifting multi-color gradient background, perfect for hero sections.

- Category: [CSS Gradients & Patterns](https://copy-css.com/category/gradients)
- Tags: animation, moving, background, hero
- Live preview: https://copy-css.com/snippets/animated-gradient
- License: Free for personal and commercial use. No signup, no attribution required.

## HTML

```html
<div class="animated-gradient"></div>
```

## CSS

```css
.animated-gradient {
  background: linear-gradient(-45deg, #ee7752, #e73c7e, #23a6d5, #23d5ab);
  background-size: 400% 400%;
  animation: gradient-shift 12s ease infinite;
}

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

@media (prefers-reduced-motion: reduce) {
  .animated-gradient {
    animation: none;
  }
}
```

## Notes

- This CSS Animated Gradient is 16 lines of pure CSS (0.4 KB) with no JavaScript and no dependencies. It uses keyframe animations, linear gradients and reduced-motion support.
- In JSX use `className` instead of `class`. In Tailwind projects put the CSS in the global stylesheet.
