Gradient

CSS gradients

90°
0%
100%
background: linear-gradient(90deg, #3b82f6 0%, #8b5cf6 100%);

Frequently Asked Questions

What types of CSS gradients are there?
CSS supports linear-gradient (straight line), radial-gradient (circular), and conic-gradient (around a center point). Each can have multiple color stops.
How do I create a smooth gradient?
Use colors that are close on the color wheel, add intermediate color stops, and avoid complementary colors which can create muddy midpoints.
Can I animate CSS gradients?
CSS gradients cannot be directly animated, but you can animate background-position or use CSS custom properties (variables) with @property for smooth transitions.