Open In App

What is the use of the filter Property in CSS?

The Filter property in CSS is a tool used for applying visual effects to elements, altering their appearance or rendering. It allows us to apply a variety of filters, such as adjusting brightness, contrast, blurring, and more.

Note: More than one filter can be added to the HTML element which is separated by the space.

Syntax

filter: none | blur( ) | brightness( ) | contrast( ) | drop-shadow( ) |
grayscale( ) | hue-rotate( ) | invert( ) |opacity() | saturate( ) | sepia( ) |
url( );

Common Functions

Combining Functions

Multiple filter functions can be combined to achieve complex visual effects.

.element {
filter: brightness(120%) contrast(80%);
}

Uses of the filter Property

Article Tags :