Pseudo-classes
This section contains reference topics for all supported Cascading Style Sheets (CSS) pseudo-classes.
In this section
| Topic | Description |
|---|---|
|
Sets the style of an element when it is engaged or active. | |
|
Applies one or more styles to the form control element that is selected. | |
|
Applies one or more styles to the form control element that is disabled. | |
|
Applies one or more styles to the element that has no child elements (including text nodes). | |
|
Applies one or more styles to the form control element that is enabled. | |
|
Applies one or more styles to any element that is the first child of its parent. | |
|
Applies one or more styles to the element that is the first sibling element of its type. | |
|
Sets the style of an element when it gains focus. | |
|
Sets the style of an element when the user hovers the mouse pointer over the element. | |
|
Applies one or more styles to radio buttons and check boxes whose toggle states cannot be determined—they are neither checked (selected) nor unchecked (cleared). | |
|
Applies one or more styles to specified input fields when the fields are in range. | |
|
Applies one or more styles to specified input fields when the fields are invalid. | |
|
In a document, selects the elements that are in a given language. | |
|
Applies one or more styles to the element that is the last child element of its parent element. | |
|
Applies one or more styles to the element that is the last sibling element of its type. | |
|
Sets the style of an a element when the link has not been visited recently. | |
|
Applies one or more styles to placeholder text in an input element. | |
|
Applies one or more styles to an element when it has focus and the user presses the space bar. | |
|
Applies one or more styles to elements that do not match the simple selector s. | |
|
Applies one or more styles to the element that is the n-th child of its parent element. | |
|
Applies one or more styles to the element that is the n-th child of its parent element, counting from the last one. | |
|
Applies one or more styles to the element that is the n-th sibling of its type, counting from the last one. | |
|
Applies one or more styles to the element that is the n-th sibling of its type. | |
|
Applies one or more styles to the element that is the only child element of its parent. | |
|
Applies one or more styles to the element that is the only sibling element of its type. | |
|
Applies one or more styles to specified input fields when the fields are optional. | |
|
Applies one or more styles to specified input fields when the fields are out of range. | |
|
Applies one or more styles to specified input fields when the fields are read-only. | |
|
Applies one or more styles to specified input fields when the fields are editable. | |
|
Applies one or more styles to specified input fields when the fields are required. | |
|
Applies one or more styles to the element that is the root element of the document. | |
|
Applies one or more styles to the target element of the referring Uniform Resource Identifier (URI). | |
|
Applies one or more styles to specified input fields when the fields are valid. | |
|
Specifies the style of an a element if the link has been visited recently. |