opacity property
Gets or sets a value that specifies object or group opacity in Cascading Style Sheets (CSS) or Scalable Vector Graphics (SVG).
![]() ![]() |
Syntax
opacity: <alphavalue> | inherit
Property values
<alphavalue>-
A Floating-point value between 0.0 (fully transparent) and 1.0 (fully opaque), inclusive.
inherit-
Indicates that the property takes the same computed value as the property for the element's parent.
CSS information
| Applies To | All elements |
|---|---|
| Media | visual |
| Inherited | no |
| Initial Value | 1 |
Standards information
- CSS Color Module Level 3, Section 3.2
Remarks
The opacity setting is applied uniformly across the entire object. Any values outside the range 0.0 to 1.0 will be clamped to this range.
Object or group opacity can be thought of conceptually as a postprocessing operation. Conceptually, after the object or group is rendered into an RGBA offscreen image, the object or group opacity setting specifies how to blend the offscreen image into the current background.
See also

