# Animated Mesh Gradient

> Four soft radial color blobs that drift slowly across the background in opposite directions.

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

## HTML

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

## CSS

```css
.mesh-animated {
  background-color: #fdf2f8;
  background-image:
    radial-gradient(circle, #f472b6, #0000 30%),
    radial-gradient(circle, #60a5fa, #0000 30%),
    radial-gradient(circle, #a78bfa, #0000 30%),
    radial-gradient(circle, #34d399, #0000 30%);
  background-size: 200% 200%;
  animation: mesh-animated-drift 16s ease-in-out infinite alternate;
}

@keyframes mesh-animated-drift {
  0% { background-position: 0 0, 100% 0, 100% 100%, 0 100%; }
  50% { background-position: 60% 20%, 30% 70%, 20% 40%, 80% 60%; }
  100% { background-position: 100% 100%, 0 100%, 0 0, 100% 0; }
}

@media (prefers-reduced-motion: reduce) {
  .mesh-animated {
    animation: none;
    background-position: 30% 30%, 70% 30%, 70% 70%, 30% 70%;
  }
}
```

## Notes

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