CSS opacity() Function

❮ Previous Functions Next ❯


img {
  filter: opacity(0.5);



The opacity() css function defines the opacity level for the image. The opacity-level describes the transparency-level.

Note: This filter is similar to the opacity property. The difference is that with filters, some browsers provide hardware acceleration for better performance.

Note: Negative values are not allowed.

Version: CSS3

Standard Syntax


Browser Support

The numbers in the table specify the first browser version that fully supports the property.


Function Arguments

The following table describes the arguments of this function.

Argument Description
value Specifies the value in 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 initial value for interpolation is 1.

See also

The other <filter-function> functions available to be used in values of the filter and backdrop-filter properties include:

❮ Previous Functions Next ❯