[CSS Selector] E:enabled
Using selector:enabled, you can apply styles to elements in an enabled state. This is commonly called a "UI state pseudo-class." It does not work in IE8 or earlier. An enabled state refers to an element that does not have the disabled attribute. Note that there is no enabled attribute — to enable a disabled element, remove the disabled attribute entirely.
Sample Code
input:enabled { color: blue;} /* Sets enabled input elements to blue text. */
Browser Preview
input:enabled { color: blue;} /* Sets enabled input elements to blue text. */
<input type="button" value="This is a button."> <input type="button" value="This button is disabled." disabled>
Browser Compatibility
Desktop
2 or earlier ×Supported in all versions
8 ×
7 ×
6 ×
8 or earlier ×Mobile
1 or earlier ×
Android Browser
2+ ○Same support as desktop version
Same support as desktop version
※ Version data based on MDN.
If you find any errors or copyright issues, please contact us.