CSS ::backdrop Pseudo-element
- Previous Page ::after
- Next Page ::before
- Go Up One Level CSS Pseudo-element Reference Manual
Definition and Usage
CSS ::backdrop
Pseudo-elements are used to set the style of the view box behind the dialog or popup elements.
Example
Example 1
Set the style of the view box behind the dialog:
dialog::backdrop { background-color: lightgreen; }
Example 2
Use gradient to set the style of the view box behind the dialog:
dialog::backdrop { background-color: #1fc8db; /* For browsers that do not support gradients */ background-image: linear-gradient(140deg, #EADEDB 0%, #BC70A4 50%, #BFD641 75%); opacity:0.75; }
CSS Syntax
::backdrop { css declarations; }
Technical Details
Version: | CSS Positioned Layout Module Level 4 |
---|
Browser Support
The numbers in the table specify the first browser version that fully supports this pseudo-element.
Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|
37 | 79 | 47 | 15.4 | 24 |
Related Pages
Tutorial:CSS Pseudo-elements
- Previous Page ::after
- Next Page ::before
- Go Up One Level CSS Pseudo-element Reference Manual