CSS :user-valid Pseudo-class
Example
Style valid <input> elements, after the user has interacted with it:
input:user-valid {
border: 2px solid green;
background-color: beige;
}
Try it Yourself »
Definition and Usage
The :user-valid
pseudo-class is used to style
valid form elements, after the user has interacted with it.
Tip: Use the :user-invalid pseudo-class to style invalid form elements (after user has interacted).
Version: | CSS4 |
---|
Browser Support
The numbers in the table specifies the first browser version that fully supports the pseudo-class.
Pseudo-class | |||||
---|---|---|---|---|---|
:user-valid | 119 | 119 | 88 | 16.5 | 105 |
CSS Syntax
:user-valid {
css declarations;
}
Related Pages
CSS Selector :user-invalid