fill-opacity

An SVG property that controls the transparency of the inner fill of a 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.

/* Usage Example */
rect {
  /* Makes the inner fill 50% transparent */
  fill-opacity: 0.5;
}

/* Syntax */
fill-opacity: opacity;

/* Global values */
fill-opacity: inherit;
fill-opacity: initial;
fill-opacity: revert;
fill-opacity: revert-layer;
fill-opacity: unset;
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+
4+
15+
Kinsta

Your first month is free

Managed WordPress hosting for faster sites.

Learn more

New CSS drops.

Join 600+ readers who've survived clearfix hacks.

ESC