Opacity
Description
opacity allows us to modify the opacity of elements.
Code Example
div.dummy2 {background:#0f0;opacity:0.2;}
div.dummy3{background:#0f0;opacity:0.4;}
div.dummy4{background:#0f0;opacity:0.6;}
Opacity modifies transparency of both element and its content. Values from 0 (invisible) to 1 (opaque).
Result
Opacity 0.2
Opacity 0.4
Opacity 0.6
Browser Support
| Browser | Comment |
|---|---|
| Firefox | Yes |
| Safari | Yes |
| Chrome | Yes |
| Opera | Yes |
| IE <= 8 | No (see Notes) |
| IE 9 | Yes? |
Notes
- A filter property is available for IE:
filter:alpha(opacity =75);
Title
details
