CSS Gradient Generator
Create beautiful linear, radial, and conic gradients with a live preview. Customize colors, angles, and stops — copy the CSS instantly.
How to Use the CSS Gradient Generator
Choose Gradient Type
Select from Linear (straight line), Radial (circular), or Conic (color wheel) gradient types. Each type creates a different visual effect.
Customize Colors
Add, remove, or reorder color stops. Click the color swatch to pick a color and use the slider to set the position. Use presets for quick inspiration.
Copy and Use
The CSS code updates in real time. Click Copy CSS to copy the generated gradient code to your clipboard and paste it into your stylesheet.
CSS Gradient Properties Reference
| Property | Values | Description |
|---|---|---|
background-image | linear-gradient(...), radial-gradient(...), conic-gradient(...) | Defines the gradient pattern as the background image |
background-size | cover, contain, 100% 100%, auto | Controls how the gradient fills the element's background area |
background-position | center, top left, 50% 50%, pixel values | Sets the starting position of the gradient within the element |
background-repeat | repeat, no-repeat, repeat-x, repeat-y | Determines if and how the gradient repeats when it doesn't fill the entire area |
background (shorthand) | Combines color + image + position + size + repeat | All-in-one property — use background: linear-gradient(...) no-repeat center/cover; to apply and position a gradient in one line |
Gradients are applied via background-image. For a fallback color (for older browsers), always specify a background-color before the gradient. Modern browsers apply both: the solid color shows while the gradient loads, then the gradient overlays it.