CSS stop-opacity Property
Description
The stop-opacity CSS property controls the transparency of an individual color stop inside an SVG gradient. It is applied to the
When a gradient is rendered the alpha from the stop's color is combined with the stop-color specification for that stop to produce the final premultiplied color used during compositing. This means adjusting stop-opacity can make a stop appear more washed-out or more solid even if the color itself remains the same, and it changes how that stop blends with neighboring stops and underlying content. Using it in concert with the color at that stop gives fine-grained control over subtle visual effects like soft fades or partially transparent bands.
The effect of stop-opacity is also influenced by any object-level opacity applied to the element that uses the gradient. For example, an overall opacity on the shape painted with the gradient or per-channel properties such as fill-opacity and stroke-opacity will further modulate the ultimately visible transparency—those are applied at the paint/compositing stage and can make a gradient appear more or less transparent as a whole versus altering individual stops. Understanding this layering is important when you need predictable blending results.
stop-opacity is useful for animations and dynamic effects: you can animate it to fade individual stops in or out, creating moving transparency bands or smoothly adjusting a gradient’s strength. It can be set through inline presentation attributes on animations to produce time-based changes. In practice, designers often combine subtle changes to both color and stop opacity to achieve polished gradient transitions that remain visually consistent across different backgrounds.
Definition
- Initial value
- 1
- Applies to
- <stop> elements in <svg>
- Inherited
- no
- Computed value
- as specified
- Animatable
- yes
- JavaScript syntax
- object.style.stopOpacity
Syntax
stop-opacity = <alphavalue> | inherit
Values
- <number>A numeric value between 0 and 1
- <percentage>A percentage value between 0% and 100%
Example
Browser Support
The following information will show you the current browser support for the CSS stop-opacity property. Hover over a browser icon to see the version that first introduced support for this CSS property.
This property is supported by all modern browsers.
Desktop
Tablets & Mobile
Last updated by CSSPortal on: 1st January 2026
