An element’s opacity can be set using the opacity
property. Values can be anywhere from 0.0
(transparent) to 1.0
(opaque).
Example Usage
<div style="opacity:0.8;">
This is a partially transparent element
</div>
Property Value | Transparency |
—— | —— |opacity: 1.0;
| Opaque |opacity: 0.75;
| 25% transparent (75% Opaque) |opacity: 0.5;
| 50% transparent (50% Opaque) |opacity: 0.25;
| 75% transparent (25% Opaque) |opacity: 0.0;
| Transparent |