Free tools Windows power users keep installed
One-click scans. No signup required.
Use CSS radial-gradient() as a value for background or background-image. For example, this creates a gradient centered in the element, transitioning from white to blue:
.card {
background-image: radial-gradient(circle at center, #fff 0%, #4b6cb7 65%, transparent 100%);
}
radial-gradient() produces an image, not a color, so it does not belong in background-color.
Radial gradient syntax
The general form is:
radial-gradient([<shape> || <size>] [at <position>], <color-stop-list>)
Shape, size and position are optional controls before the comma. The color stops follow the comma. For example:
.panel {
background-image: radial-gradient(ellipse closest-side at 30% 40%, white, royalblue 70%, transparent);
}
This specifies an elliptical gradient whose ending shape reaches the nearest side, with its center at 30% across and 40% down the element.
#1 Best Overall
What the defaults do
If you leave the controls out, CSS uses an ellipse, extends the gradient to the farthest corner, and places its center in the middle:
.card {
background: radial-gradient(#e66465, #9198e5);
}
Choose the shape, extent and center
Circle or ellipse
Use circle for a circular gradient and ellipse for an axis-aligned elliptical one. The default ellipse adapts to the element’s proportions; a circle keeps the same radius in every direction.
Rank #2
Size keywords or explicit lengths
The extent keywords describe where the gradient’s ending shape reaches in relation to the element:
closest-side: reaches the nearest side.farthest-side: reaches the farthest side.closest-corner: reaches the nearest corner.farthest-corner: reaches the farthest corner; this is the default.
You can also set an explicit size. For example, circle 12rem sets a circular ending shape with a 12rem radius:
The Tool Desk
Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →.glow {
background: radial-gradient(circle 12rem at 50% 50%, #7c4dff, transparent);
}
Position the center
After at, use the familiar CSS position syntax. For example, at 25% 30% positions the center a quarter of the way across and 30% down; at top right places it at that corner. If omitted, the center is centered.
Control the transition with color stops
Each color stop has a color and can have one or two positions. Positions are measured along rays from the gradient’s center toward its ending shape: 0% is the center, and 100% is where the ray meets that shape. CSS distributes stop positions that you leave unspecified according to its gradient rules.
Rank #4
Make a soft spotlight
Use gradual transitions and transparency to make a glow that blends into whatever is behind it:
.spotlight {
background: radial-gradient(ellipse at 30% 20%, #fff8 0%, #77aaff66 35%, transparent 70%);
}
Make crisp rings or boundaries
Adjacent stops at the same percentage create a sharp color boundary rather than a gradual transition. Stops with two positions can define a solid band:
Best Value
.badge {
background: radial-gradient(circle, #ffcf33 0 58%, #d85624 58% 60%, transparent 60%);
}
The colors and measurements in these examples illustrate the syntax; they are not tested design recommendations.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Use repeating rings when the pattern should continue
A gradient’s concrete dimensions match the element it is applied to; it has no intrinsic dimensions or preferred aspect ratio. To repeat rings outward through the background, use repeating-radial-gradient():
.rings {
background: repeating-radial-gradient(circle, #263238 0 8px, #80cbc4 8px 16px);
}
Troubleshoot common issues
- The gradient does not appear: Check that you assigned it to
backgroundorbackground-image, notbackground-color. - The gradient looks elliptical: That is the default shape. Add
circlebefore the comma if you want a circular gradient. - The center is in the wrong place: Set it explicitly with
at <position>before the comma. - The edge lands in an unexpected place: The default extent is
farthest-corner. Try a different size keyword or specify a length. - A transition is softer or sharper than intended: Adjust the stop positions. Use two adjacent stops at the same position for a hard boundary.
- A newer color interpolation feature behaves differently between browsers: Basic radial gradients are widely available, but support can vary for newer syntax. Check compatibility for the particular feature you use.
Browser support and standards
The basic radial-gradient() function is broadly supported. MDN labels it Baseline Widely available and reports cross-browser availability since July 2015; that date describes availability, not a guarantee that every newer gradient-related syntax works everywhere. CSS Images Module Level 3 defines the core radial-gradient syntax, while current reference material also covers later CSS Color and CSS Images features.
Or skip the browser setup
If you need a screenshot of a page showing your gradient, ScreenshotNeo provides a website screenshot API. One GET request returns an image or PDF; its capture flow also handles cookie and consent banners before capture and removes known newsletter popups and chat widgets. For a general-purpose radial-gradient reference, you can use this example request:
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
See the ScreenshotNeo API documentation for request options. Bot checks, blank pages, timeouts and failed loads are not billed, and cache hits cost nothing; response headers indicate the page verdict and billing status. An MCP server provides screenshot tools for AI agents, and the free plan includes 1,000 screenshots a month without a card. Paid plans start at $5 for 3,000 shots. Sign up for ScreenshotNeo free.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




