stroke-opacity
Defines the transparency (alpha) of the border (stroke) of an SVG shape or text. A value of 0 is fully transparent, and 1 is fully opaque.
It is documented as part of the Scalable Vector Graphics specification.
Syntax
/* Usage Example */
text.outline {
stroke: blue;
/* Makes the outline of the text 30% transparent */
stroke-opacity: 0.3;
}
/* Syntax */
stroke-opacity: opacity;
/* Global values */
stroke-opacity: inherit;
stroke-opacity: initial;
stroke-opacity: revert;
stroke-opacity: revert-layer;
stroke-opacity: unset;
stroke-opacity Browser support
Widely available
Since
2020 96% global usage
This feature is well established and works across many devices and browser versions. It has been available across browsers since 2020.
1+
1.5+
4+
15+