CSS Filters and Blend Modes bring professional Photoshop-grade image processing and graphic blending directly to the browser DOM in real time without opening graphic editing software.
| Filter Function | Standard Example | Visual Image Effect |
|---|---|---|
blur() |
filter: blur(5px); |
Applies Gaussian blurring to the element. |
grayscale() |
filter: grayscale(100%); |
Converts full-color photos to vintage black & white. |
brightness() |
filter: brightness(1.2); |
Brightens (or darkens if < 1) the element. |
contrast() |
filter: contrast(150%); |
Boosts separation between lights and darks. |
drop-shadow() |
filter: drop-shadow(0 4px 6px rgba(0,0,0,0.2)); |
Cuts a shadow matching transparent PNG silhouettes (unlike box-shadow which casts a rectangular box). |
While filter applies to the element itself, backdrop-filter blurs everything behind the semi-transparent element, creating the famous Apple iOS / Windows Acrylic glassmorphism look:
.glass-card {
background-color: rgba(255, 255, 255, 0.15); /* Semi-transparent white */
backdrop-filter: blur(12px) saturate(180%); /* Blurs background behind card */
-webkit-backdrop-filter: blur(12px) saturate(180%); /* Safari support */
border: 1px solid rgba(255, 255, 255, 0.2);
border-radius: 12px;
padding: 30px;
box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.1);
}
Boost your CSS and front-end development proficiency by exploring these closely connected topics:
Understand margins, borders, padding, content and the universal box-sizing fix.
Master 1D alignment, justify-content, align-items, flex-wrap and responsive flow.
Build powerful two-dimensional grid layouts with template areas and fr units.
Eliminate styling conflicts and master selector weights from 0,0,0,1 to !important.