css3 pseudo-classes: ":first-of-type", ":last-of-type", ":only-of-type", ":only-child", ":nth-child( 2)", ":enabled", ":disabled", ":checked".
The operating environment of this tutorial: Windows 7 system, CSS3 version, Dell G3 computer.
Some new pseudo-classes in css3:
##:first-of-type
:The first-of-type selector matches every element that is the first child of a specific type from its parent element.:last-of-type
:last-of-type selector matches the last child of a specific type that belongs to its parent element for each element of the element.:only-of-type
:only-of-type selector matches the only child element of a specific type that belongs to its parent element of each element.:only-child
:only-child selector matches every element that is the only child element of its parent element.:nth-child(2)
:nth-child(n) selector matches the Nth child element that belongs to its parent element , regardless of the type of element. n can be a number, keyword or formula.:enabled and :disabled
The disabled state of the form control.:checked
:checked The selector matches every checked input element (applies only to radio buttons or checkboxes).css video tutorial)
The above is the detailed content of What are the new pseudo-classes in css3?. For more information, please follow other related articles on the PHP Chinese website!