concept

Gradient color stops — CSS reference

Each color stop places a color along the gradient parameter. Omitted stop positions are resolved by the stop fix-up algorithm. Stops at the same position can form a hard boundary; decreasing positions are clamped to preceding positions. Interpolation occurs between resolved stops.

Formal Syntax & Structure

css syntaxcss
See related property or function grammar.

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:linear-gradient(90deg,red 50%,blue 50%)}</style><body><div id="a" aria-hidden="true"></div><p>Decorative background sample.</p></body></html>
CSS Reference