property

Stop opacity — CSS reference

Sets the opacity of a gradient stop separately from its color. The transparent first stop blends toward the opaque blue end; it is not whole-shape opacity.

Formal Syntax & Structure

css syntaxcss
stop-opacity: 0;

Working Example

Example Snippetcss
<!doctype html><html lang="en"><meta charset="utf-8"><title>stop-opacity</title><style>body{margin:0;background:white}svg{display:block}#a{stop-opacity:0}</style><body><svg xmlns="http://www.w3.org/2000/svg" width="240" height="160" viewBox="0 0 240 160" role="img" aria-label="SVG styling example"><defs><linearGradient id="g"><stop id="a" offset="0" stop-color="red"/><stop offset="1" stop-color="blue"/></linearGradient></defs><rect x="0" y="0" width="200" height="120" fill="url(#g)"/></svg></body></html>
CSS Reference