Modern CSS Filter Effects
Grayscale, blur, hue, sepia, duotone and glow filters for photos, logos, icons and text.
1Blur Focus
Put it on a row of cards or images: the hovered item stays sharp while its siblings blur and fade. Class: fx-blur-focus
<div class="d-flex flex-wrap align-items-center justify-content-center gap-3 p-3 h-100" style="min-height:200px">
<div class="fx-blur-focus d-flex gap-2">
<img src="https://images.unsplash.com/photo-1778864875166-92a5c1adf24a?auto=format&fit=crop&w=800&h=800&q=70" alt="First gallery item" class="rounded-3 object-fit-cover" style="width:82px;height:110px"><img src="https://images.unsplash.com/photo-1706806594967-44e2b31f01d0?auto=format&fit=crop&w=800&h=800&q=70" alt="Second gallery item" class="rounded-3 object-fit-cover" style="width:82px;height:110px"><img src="https://images.unsplash.com/photo-1758599668356-c8c919e24dda?auto=format&fit=crop&w=800&h=800&q=70" alt="Third gallery item" class="rounded-3 object-fit-cover" style="width:82px;height:110px">
</div>
</div>
/* CSS (already in assets/css/effects.css) */
.fx-blur-focus > * { transition: filter .4s ease, opacity .4s ease, transform .4s ease; }
.fx-blur-focus:hover > :not(:hover) { filter: blur(3px) saturate(.6); opacity: .65; }
.fx-blur-focus > :hover { transform: translateY(-4px); }
@media (prefers-reduced-motion: reduce) {
.fx-blur-focus, .fx-blur-focus::before, .fx-blur-focus::after, .fx-blur-focus *, .fx-blur-focus *::before, .fx-blur-focus *::after { animation: none !important; transition: none !important; }
}2Glitch Filter
Short bursts of hue, contrast and position jumps make an image look like a corrupted signal. Class: fx-glitch-filter
<div class="d-flex flex-wrap align-items-center justify-content-center gap-3 p-3 h-100" style="min-height:200px">
<img src="https://images.unsplash.com/photo-1758599668338-4c55a3bd0ce0?auto=format&fit=crop&w=1200&h=800&q=70" alt="Photo with a glitch filter" class="fx-glitch-filter object-fit-cover rounded-3" style="width:200px;height:140px">
</div>
/* CSS (already in assets/css/effects.css) */
.fx-glitch-filter { animation: fx-glitch-filter-glitch 3.5s steps(1) infinite; }
@keyframes fx-glitch-filter-glitch {
0%, 86%, 100% { filter: none; transform: none; }
88% { filter: hue-rotate(90deg) saturate(3) contrast(1.6); transform: translate(-4px, 1px); }
90% { filter: invert(.15) contrast(2); transform: translate(4px, -2px) skewX(6deg); }
92% { filter: hue-rotate(-70deg) saturate(2); transform: translate(-2px, 0); }
94% { filter: brightness(1.6); transform: translate(2px, 1px); }
}
@media (prefers-reduced-motion: reduce) {
.fx-glitch-filter, .fx-glitch-filter::before, .fx-glitch-filter::after, .fx-glitch-filter *, .fx-glitch-filter *::before, .fx-glitch-filter *::after { animation: none !important; transition: none !important; }
}3Saturation Boost
Desaturated at rest, vivid on hover - draws attention to the product the visitor is looking at. Class: fx-saturation-boost
<div class="d-flex flex-wrap align-items-center justify-content-center gap-3 p-3 h-100" style="min-height:200px">
<img src="../assets/img/product-5.svg" alt="Product with boosted colour" class="fx-saturation-boost rounded-3 object-fit-cover" style="width:120px;height:120px"><img src="../assets/img/product-6.svg" alt="Second product" class="fx-saturation-boost rounded-3 object-fit-cover" style="width:120px;height:120px">
</div>
/* CSS (already in assets/css/effects.css) */
.fx-saturation-boost { filter: saturate(.6); transition: filter .4s ease, transform .4s ease; }
.fx-saturation-boost:hover, .fx-saturation-boost:focus-visible { filter: saturate(1.8); transform: scale(1.03); }
@media (prefers-reduced-motion: reduce) {
.fx-saturation-boost, .fx-saturation-boost::before, .fx-saturation-boost::after, .fx-saturation-boost *, .fx-saturation-boost *::before, .fx-saturation-boost *::after { animation: none !important; transition: none !important; }
}