Ad space (banner)
🎨HTML & CSS Lessons
Lesson 44 / 50

Creating a Frosted-Glass Effect with backdrop-filter

In this lesson you'll learn how to build a frosted-glass effect using backdrop-filter, so you can achieve a modern UI design visual effect. This is for people searching "CSS backdrop-filter usage."

Using backdrop-filter: blur(value) lets you blur "whatever's showing through behind" an element. Combined with a semi-transparent background, you can achieve a look like the "frosted glass" you often see in smartphone apps.

The sample code layers a panel combining a semi-transparent white (rgba(255,255,255,0.3)) with backdrop-filter: blur(8px); on top of a gradient background. Confirm how the background behind the panel shows through, blurred but visible.

A common beginner stumbling block is the difference between backdrop-filter and the ordinary filter property. filter applies effects like blur to the element itself, while backdrop-filter only applies the effect to "whatever's behind" the element — an important distinction.

Using this for a notification panel or modal window's background lets you achieve a polished look that faintly shows content behind it while keeping it readable. This is a visual effect that's very popular in recent UI design.

HTML & CSS
OUTPUT

💡 The preview runs entirely on this page — nothing is sent externally.

Ad space (banner)
Ad space (in-article)