function
radial-gradient() — CSS reference
Colors expand from a center toward an ending ellipse or circle. Default sizing is farthest-corner. Unlike a linear gradient, equal-distance curves form rings. Specify the center and radius for a predictable circle.
Formal Syntax & Structure
css syntaxcss
radial-gradient([ <ending-shape> || <size> ]? [ at <position> ]?, <color-stop-list>) (representative)Working Example
Example Snippetcss
<!doctype html><html lang="en"><meta charset="utf-8"><title>CSS image painting lab</title><style>body {margin:0} .sample {background:#dcebe9;color:#182e32}body{background:white} #a{width:100px;height:80px;background-color:blue}#a{background-image:radial-gradient(circle 20px at center, red 50%, blue 50%)}</style><body><div id="a" aria-hidden="true"></div><p>Decorative background sample.</p></body></html>