Hi all,
This is an experimental technology
Because this technology's specification has not stabilized, check the compatibility table for the proper prefixes to use in various browsers. Also note that the syntax and behavior of an experimental technology is subject to change in future versions of browsers as the spec changes.
MDN
Filters are used to adjust the rendering of image, background or border.
Syntax of filters:-
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%);
Below is some examples of filters -
blur()
img{filter: blur(2px);}
brightness()
img{filter: brightness(0.4);}
contrast()
img{filter: contrast(200%);}
grayscale()
img{filter:grayscale(50%);}
drop-shadow()
img{filter: drop-shadow(16px 16px 20px blue);}
hue-rotate()
img{filter: filter: hue-rotate(90deg);}
invert()
img{filter: invert(75%);}
saturate()
img{filter: saturate(30%);}
sepia()
img{filter: sepia(60%);}
opacity()
img{filter: opacity(25%);}
0 Comment(s)