CSS Gradient Generator
Build linear and radial CSS gradients with a live preview and copy the ready-to-use background code.
Cara menggunakan CSS Gradient
- 01
Choose a linear or radial gradient.
- 02
Add color stops and drag each one's color and position.
- 03
For a linear gradient, set the angle with the slider.
- 04
Copy the CSS and paste it into your stylesheet.
What this generator does
This CSS gradient generator builds linear and radial gradients from color stops you control, with a live preview and a ready-to-paste background declaration. Drag the stops along the bar, set the angle or shape, and the CSS updates instantly.
Everything runs in your browser from the colors and settings you choose, so nothing is uploaded and you can copy the result and use it offline.
Linear and radial gradients
A linear gradient blends colors along a straight line, and the angle sets its direction: 0 degrees points up, 90 degrees points right, 180 degrees points down. A radial gradient blends outward from the center, as a circle or an ellipse.
Both are standard CSS values, written as linear-gradient() and radial-gradient(), and both use the same list of color stops, so switching the type keeps your colors and only changes how they spread.
Working with color stops
Each color stop is a color placed at a position from 0% to 100%. The gradient blends smoothly between neighboring stops, so a stop's position controls where its color peaks and how quickly it fades into the next one.
Add as many stops as you need to build multi-color gradients, drag them to fine-tune the blend, or click the bar to drop a new stop where you want it. Two stops is the minimum a gradient needs.
Using the CSS in your project
Copy the generated code and paste it as the background of any element, such as a section, card or button. Modern browsers support linear-gradient and radial-gradient without a vendor prefix, so the value works as-is.
Because a gradient is just a value, you can also use it anywhere a background image is expected, layer it over a solid color as a fallback, or reuse the same stops across a linear and radial version for a consistent look.
Pertanyaan yang sering diajukan
What is the difference between a linear and radial gradient?
A linear gradient blends colors along a straight line at the angle you set. A radial gradient blends outward from the center in a circle. Both use the same color stops.
How do color stops work?
Each stop is a color placed at a position from 0% to 100%. The gradient blends smoothly between neighboring stops, so moving a stop changes where its color peaks.
How do I use the generated CSS?
Copy the code and paste it as the background property of any element, for example a div or a button. It works in every modern browser without a prefix.
Can I add more than two colors?
Yes. Use Add stop to insert as many colors as you like, then set each one's position to control the blend.
Is anything uploaded?
No. The gradient is built entirely in your browser from the colors and settings you choose, and nothing is sent to a server.