Filters and Blend Modes
๐ Covered in this chapter:
filter ยท Blur ยท Brightness ยท Contrast ยท Grayscale ยท Saturate ยท Drop Shadow ยท mix-blend-mode ยท background-blend-mode ยท Accessibility ยท Performance
Welcome to Chapter 32: Filters and Blend Modes โ part of the CSS Complete Roadmap. This lesson covers all subtopics with clear explanations, code examples, and best practices used in professional web development.
1CSS filter Property
.photo:hover {
filter: brightness(1.1) contrast(1.05);
}
.disabled-img {
filter: grayscale(100%) opacity(0.6);
}
.glass {
backdrop-filter: blur(12px);
background: rgba(255, 255, 255, 0.2);
}
.shadow-icon {
filter: drop-shadow(0 4px 8px rgba(0,0,0,0.3));
}
2Blend Modes & Accessibility
CSS
.blend-overlay {
mix-blend-mode: multiply;
}
.texture-bg {
background-blend-mode: overlay;
background-image: url('texture.png'), linear-gradient(#2563eb, #1d4ed8);
}
โฟ Accessibility & Performance
- Heavy blur/backdrop-filter mobile lo slow avvochu
- Filters contrast affect cheyochu โ text readability verify cheyandi
prefers-reduced-motionlo animated filters avoid cheyandi