CSS :modal Pseudo-class
Example
Select and style the element that is in a modal state:
:modal {
background-color: gold;
border: 2px solid maroon;
border-radius: 8px;
font-size: 20px;
}
Try it Yourself »
Definition and Usage
The CSS :modal
pseudo-class is used to select and
style the element that is in a modal state.
Version: | CSS4 |
---|
Browser Support
The numbers in the table specifies the first browser version that fully supports the pseudo-class.
Pseudo-class | |||||
---|---|---|---|---|---|
:modal | 105 | 105 | 103 | 15.6 | 91 |
CSS Syntax
:modal {
css declarations;
}