How CSS Radial Gradients Work
The CSS radial-gradient() function creates a gradient that radiates outward from a center point. The simplest form — radial-gradient(#f093fb, #f5576c) — creates an elliptical gradient centered in the element. Colors transition from the center outward, with the first color at the center and the last color at the edges.
Shape and Size Options
Radial gradients support two shapes: circle maintains equal radii regardless of container aspect ratio, while ellipse (the default) stretches to fill the container. Four size keywords control the gradient's extent: closest-side, farthest-side, closest-corner, and farthest-corner.
Positioning the Center Point
Control where the gradient originates with the at keyword: radial-gradient(circle at 25% 75%, ...). In this tool, simply click on the preview to set the center point, or use the X/Y input fields for precise positioning.