CSS ::backdrop Pseudo-Element

Beginner
2 examples
Updated: Nov 2026

Definition and Usage

The ::backdrop pseudo-element styles the full-screen layer rendered behind a top-layer element such as a modal dialog or open popover.

CSS Syntax

syntax.css
dialog::backdrop {
  background: rgb(15 23 42 / 0.55);
}

Key Uses

PatternPurposeTry it
dialog::backdropDim the page behind a modal dialogTry it
popover::backdropOptional backdrop for popovers that use oneTry it

CSS Examples

Dimmed dialog overlay

example.css
dialog::backdrop {
  background: rgb(15 23 42 / 0.55);
}
Try It Yourself

Browser Support

::backdrop is a CSS selector.

✓ Selectors

::backdrop

Supported in modern browsers.

94% Modern browsers
Google Chrome Recent
Full support
Mozilla Firefox Recent
Full support
Apple Safari Recent
Full support
Microsoft Edge Recent
Full support
::backdrop Modern support

Bottom line: Safe for modern sites. Keep readable defaults without the selector.

Frequently Asked Questions

The overlay behind a top-layer UI element such as a modal dialog.
No. Style it with background and similar paint properties only.
Only when the popover mode creates one. Modal dialogs always do.
You can try backdrop-filter on ::backdrop in supporting browsers.
Widely supported with the dialog element and popover API.

Next: ::file-selector-button

Continue with ::file-selector-button.

::file-selector-button →

CODETOFUN NEWS

Stay Ahead in Tech

Get the latest IT news, programming updates, and technology trends directly on your phone.

Your daily dose of tech, straight to your feed.

About the author

Mari Selvan M P
Mari Selvan M P 🔗

Developer, cloud engineer, and technical writer

  • Experience 12 years building web and cloud systems
  • Focus Full Stack Development, AWS, and Developer Education

I write practical tutorials so students and working developers can learn by doing—from databases and APIs to deployment on AWS.

2 people found this page helpful