CSS :autofill Pseudo-class
Example
Select and style <input> elements that have been autofilled by the browser:
input:autofill {
border: 2px solid salmon;
}
Try it Yourself »
Definition and Usage
The :autofill
pseudo-class is used to select and style
<input> elements that have been autofilled by the browser. This pseudo-class
stops working if the user edits the autofilled field.
Version: | CSS2 |
---|
Browser Support
The numbers in the table specifies the first browser version that fully supports the pseudo-class.
Pseudo-class | |||||
---|---|---|---|---|---|
:autofill | 110 | 110 | 86 | 15 | 96 |
CSS Syntax
:autofill {
css declarations;
}
Related Pages
CSS tutorial: CSS Forms