Trên trang này

The :enabledCSSpseudo-class represents any enabled element. An element is enabled if it can be activated (selected, clicked on, typed into, etc.) or accept focus. The element also has a disabled state, in which it can't be activated or accept focus.

/* Selects any enabled <input> */
input:enabled {
color: blue;
}

Syntax

:enabled

Example

The following example makes the color of text and button <input>s green when enabled, and gray when disabled. This helps the user understand which elements can be interacted with.