← Back to CSS
28

CSS filters: `filter` and `backdrop-filter`

Use CSS filters in real interfaces with complete `filter()` functions, readable glass panels and practical performance guidelines.

📘 Theory

What each filter function is good for

Not every filter belongs in every interface state.

  • Tone correction: `brightness()`, `contrast()`, `saturate()`, `hue-rotate()`.
  • Mood or state changes: `grayscale()`, `sepia()`, `invert()`, `opacity()`.
  • Spatial perception: `blur()` and `drop-shadow()`.

Filter order changes the result

1

Filters run from left to right. Desaturating first and then increasing contrast is not the same as doing those actions in the opposite order.

2

In real projects, it is smarter to define named presets for hover, disabled, vintage thumbnail or hero-image treatment than to improvise a new chain in every component.

`backdrop-filter` for glassmorphism

1

For `backdrop-filter` to feel visible, you need a semi-transparent panel and something visually rich behind it such as a gradient, photo or other content.

2

The most stable production recipe is usually moderate blur, a subtle border and text contrast that still works even when the background changes.

🧪 Learn by doing

Example Interactive demo: full filter lab Explore all the main `filter()` functions, including `drop-shadow`, and see how they stack together.
Example Interactive demo: glassmorphism generator Adjust blur, opacity, border and shadow until the glass panel feels readable and defensible in a real product UI.

🏁 Challenges

Challenge Challenge: build a glass panel Apply `backdrop-filter` with blur and saturation, plus a translucent surface.

What is this?

I'm Cristian Eslava and I sometimes build websites so both you and I can learn and experiment. culTest

I made this in February 2026 to make learning easier for my students. The idea is to learn web development by practicing and to keep expanding the project with new topics, tests and challenges.

It draws inspiration from MDN, W3Schools, CodePen, Manz and many other web development references. I wanted to combine useful theory, runnable examples, challenges and the testing system I had already built for culTest. culTest

If you liked it, if you didn't, or if you want to get in touch, write to me at cristianeslava@gmail.com