top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

What is filter property in CSS and why it is use?

0 votes
348 views
What is filter property in CSS and why it is use?
posted Jun 26, 2017 by Biswajit Maity

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

0 votes

filter

The filter property provides graphical effects like blurring, sharpening, or color shifting an element. Filters are commonly used to adjust the rendering of images, backgrounds, and borders.

Syntax

With a function, use the following:

filter: <filter-function> [<filter-function>]* | none

Example

filter: blur(5px);
filter: brightness(0.4);
filter: contrast(200%);
filter: drop-shadow(16px 16px 20px blue);
filter: grayscale(50%);
filter: hue-rotate(90deg);
filter: invert(75%);
filter: opacity(25%);
filter: saturate(30%);
filter: sepia(60%);

/* Apply multiple filters */
filter: contrast(175%) brightness(3%);

/* Global values */
filter: inherit;
filter: initial;
filter: unset;
answer Jun 26, 2017 by Subhajit Maity
...