CSS :enabled pseudo-class
- Kwanza :empty
- Pya :first
- Rejea kipenyo chifuatilia Kitabu cha Taarifa ya Mshakiliko wa Kina wa CSS
Definition and usage
CSS :enabled
Pseudo-classes are used to select and set the style of any enabled element (mainly used for form elements).
Tip::disabled
Pseudo-classes are used to select and set the style of any disabled element (mainly used for form elements).
Example
Set a light gray background color for all disabled <input> elements and a yellow background color for all enabled <input> elements:
input:disabled { background-color: lightgray; } input:enabled { background-color: yellow; }
CSS syntax
:enabled { css declarations; }
Technical details
Version: | CSS3 |
---|
Browser support
The numbers in the table specify the first browser version that fully supports this pseudo-class.
Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|
4.0 | 9.0 | 3.5 | 3.2 | 9.6 |
Makampuni ya muhimu
Tazama:CSS :disabled hali la kina
- Kwanza :empty
- Pya :first
- Rejea kipenyo chifuatilia Kitabu cha Taarifa ya Mshakiliko wa Kina wa CSS