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-1631217873436-b0fa88e71f0a?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-1758691462858-f1286e5daf40?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-1758691463331-2ac00e6f676f?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; }
}2Text Filter Effects
Headings come into focus from a blur with a coloured drop shadow - a cinematic title reveal. Class: fx-text-filter-effects
Healthy smiles start here
<div class="d-flex flex-wrap align-items-center justify-content-center gap-3 p-3 h-100" style="min-height:200px">
<h2 class="h2 fw-bold text-primary text-center mb-0 fx-text-filter-effects">Healthy smiles start here</h2>
</div>
/* CSS (already in assets/css/effects.css) */
.fx-text-filter-effects { filter: drop-shadow(0 4px 10px rgba(var(--wt-primary-rgb), .45)); animation: fx-text-filter-effects-focus 5s ease-in-out infinite; }
@keyframes fx-text-filter-effects-focus {
0% { filter: blur(8px) drop-shadow(0 4px 10px rgba(var(--wt-primary-rgb), 0)); opacity: .2; letter-spacing: .25em; }
30%, 85% { filter: blur(0) drop-shadow(0 4px 10px rgba(var(--wt-primary-rgb), .45)); opacity: 1; letter-spacing: normal; }
100% { filter: blur(0) drop-shadow(0 4px 10px rgba(var(--wt-primary-rgb), .45)); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
.fx-text-filter-effects, .fx-text-filter-effects::before, .fx-text-filter-effects::after, .fx-text-filter-effects *, .fx-text-filter-effects *::before, .fx-text-filter-effects *::after { animation: none !important; transition: none !important; }
}