DEV Community

Mihaidev-cloud
Mihaidev-cloud

Posted on

How to create a filter for image

Hello , Today I will explain the filter how it works and how we can use it

Well the “filter” have many syntax like these

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%);
filter: none;

Are many syntax’s

I will leave a link with all syntax’s https://developer.mozilla.org/en-US/docs/Web/CSS/filter

How can we use it ? Well, we can use only for css , scss and everything based on css I made a example code img {
filter:blur(5px);
}

Just paste your code on image and done!

Top comments (0)