CSS :read-only Pseudo-class
Example
Select and style any "read-only" input elements:
input:read-only {
background-color: lightgray;
border:
0;
}
Try it Yourself »
Definition and Usage
The :read-only
pseudo-class selects elements which are "readonly".
Form elements with a "readonly" attribute are defined as "readonly".
Version: | CSS3 |
---|
Browser Support
The numbers in the table specify the first browser version that fully supports the pseudo-class.
Pseudo-class | |||||
---|---|---|---|---|---|
:read-only | 1 | 13 | 78 | 4 | 9 |
CSS Syntax
:read-only {
css declarations;
}
Related Pages
CSS Selector :read-write