CSS filters allow us to apply various visual effects to images and other elements. These effects bring functions familiar from graphic editors to the web, such as blur, grayscale, or shadows.
The <filter> property in CSS enables visual effects such as blur, brightness, or contrast. These can also be chained, allowing multiple effects to be applied at once.
Filters are most commonly used on images, for example to make them grayscale, blurred, or tinted. This is especially useful for design highlights or hover effects.
Code Details
<img src="https://placehold.co/200x100/png" style="filter: grayscale(100%);">
<img src="https://placehold.co/200x100/png" style="filter: blur(5px);">
Preview
The drop-shadow filter is particularly popular because it creates a natural shadow effect. Compared to traditional box-shadow, a filter shadow better follows the transparency of an image.
Filters are powerful tools, but attention must be paid to performance and user experience.
Please sign in to ask Lara about CSS filters.
Select Language
Set theme
© 2025 ReadyTools. All rights reserved.