CSS :read-writeSelectors
Complete CSS Selector Reference Manual
Example
If the input element is not read-only, i.e., does not have the "readonly" attribute, set the input field style to yellow:
input:read-write
{
background-color: yellow;
}
{
background-color: yellow;
}
Try it Yourself »
Definition and use
The :read-write selector is used to match readable and writable elements.
Note:Currently, in most browsers, the :read-write selector only applies to input and textarea elements.
Browser Support
The numbers in the table indicate the first browser version number that supports the property.
| Selectors | |||||
|---|---|---|---|---|---|
| :read-only | Supported | Not supported | -moz- | Yes | Yes |
CSS Syntax
:read-write
{
CSS Declaration;
}
{
CSS Declaration;
}
Related Pages
CSS Selectors:read-only
other extensions