- Dynamic pseudo-Class selector:
E:link: Select the matching e element, and the matching element is defined and the hyperlink has not been accessed.
e:visited: Select the matching e element, and the matching element is defined and has been accessed.
E:active: Selects the matching e element, and the matching element is activated. Often used on anchor points and buttons.
E:hover: Selects the matched e element, and the user mouse rests on the element.
E:focus: Selects the matched e element, and the element receives focus.
The anchor pseudo-class set adheres to the "love and Hate Principle", that is, love/hate, that is, "link-visited-hover-active".
- Target pseudo-Class selector (this is a dynamic selector, the style effect takes effect only if there is a URL pointing to the matching element)
E:target: Matches the child element below the e element, the child element that is linked to by the URL.
In the example below, the element that is matched by #div1:target is #div2, which is not only a child of #div1, but is also pointed to by the URL (a tag href= "#div2"). Two conditions are indispensable. (This is self-understanding, unofficial explanation).
<! DOCTYPE html>
- Language pseudo-Class selector:
E:lang (language): Selects all elements that match E, and the matching element has the lang attribute, and its value is language.
There are two ways to set up a document language. First, if you use HTML5, you can set this:or manually specify in the document:
<lang= "fr">
- UI element State pseudo-class selector:
E:checked: Matches a selected check button or radio button FORM element
E:enabled: Match all enabled form elements
E:disabled: Match all disabled form elements
CSS pseudo-class selector detailed parsing and case use-----pseudo-class selector (1)