opacity() CSS Function
opacity() CSS function sets the degree of transparency of an image. In its effect, it is similar to the opacity property, but some filter browsers use hardware acceleration to increase their performance.
opacity() = opacity(amount)
- amountThe amount of the conversion, specified as a <number> or a <percentage>. A value of 0% is completely transparent, while a value of 100% leaves the input unchanged. Values between 0% and 100% are linear multipliers on the effect. The lacuna value for interpolation is 1.
<img class="opacity" src="images/nature.jpg" alt="Opacity Example">
filter: opacity( 50% );
|Tablets / Mobile|