CSS3: disabled Selector
CSS selectors complete reference manual
Examples
Set all type = "text" disable input elements background color:
input[type="text"]:disabled
{
background:#dddddd;
}
{
background:#dddddd;
}
try it"
Definition and Usage
: Disabled selector that matches each element disabled (mainly used in form elements).
Browser Support
Figures in the table represent the first browser to support the version number of the property.
选择器 | |||||
---|---|---|---|---|---|
:disabled | 4.0 | 9.0 | 3.5 | 3.2 | 9.6 |
More examples
Examples
Disable all input elements to set the background color:
input:disabled
{
background:#dddddd;
}
{
background:#dddddd;
}
try it"