The CSS filter property lets you apply graphical effects like blurring or color shifting to an element. Filters are commonly used to adjust the rendering of images, backgrounds, and borders.
Filter functions include:
The blur function applies a blur effect to an image.
The brightness(amount) function adjusts the brightness of an image, making it appear brighter or darker.
The contrast function adjusts the contrast of the image.
drop-shadow(w h b c) creates a shadow effect that extends beyond an image for the width w and height h with blur b and color c.
The grayscale function converts an image to grayscale.
The hue-rotate function applies a hue rotation (based on the color circle) to an image.
The invert function inverts the colors of an image to make dark areas bright and bright areas dark.
The opacity function sets the opacity of an image to change its transparency.
The saturate function controls the color saturation for an image.
The sepia function converts an image to sepia.
(11) The drop-shadow Function
drop-shadow(w h b c) creates a shadow effect that extends beyond an image for the width w and height h with blur b and color c. w, h, and b are values in pixels.
filter: drop-shadow(5px 9px 2px blue);
Using Multiple CSS Filters
Multiple CSS filters can be used together by separating them with spaces. The following code demonstrates the use of the blur and the hue-rotate functions.
filter: blur(5px) hue-rotate(180deg);
Read about 3-D Transforms here.