CSS: read-only selector
CSS selectors complete reference manual
Examples
If the input element is set "readonly" attribute, set the input box style yellow:
input:read-only
{
background-color: yellow;
}
{
background-color: yellow;
}
try it"
Definitions and use
: Read-only selector for selecting a set of elements "readonly" attribute.
Form elements can be set to "readonly" attributes to define the element read-only.
Note: Currently, most browsers,: read-only selector applies to input and textarea elements, but it also applies to the set of elements "readonly" attribute.
Browser Support
Figures in the table represent the first browser to support the version number of the property.
选择器 | |||||
---|---|---|---|---|---|
:read-only | 支持 | 不支持 | -moz- | Yes | Yes |
CSS Syntax
:read-only
{
css 声明 ;
}
{
css 声明 ;
}
Related Pages
CSS selectors : read-write