Home > Article > Web Front-end > What are the new pseudo-classes in css3?
The new pseudo-classes in css3 are: 1. [p:first-of-type]; 2. [p:last-of-type]; 3. [p:only-of-type]; 4 , [p:only-child]; 5. [p:nth-child(2)].
(Recommended tutorial: css quick start)
What are the new pseudo-classes in CSS3?
p:first-of-type selects the first element that belongs to its parent element
p:last-of-type selects the last element that belongs to its parent element
p:only-of -type selects the only element that belongs to its parent element
p:only-child selects the only child element that belongs to its parent element
p:nth-child(2) selects the only child element that belongs to its parent element The second child element
:enabled :disabled The disabled state of the form control
:checked The radio button or check box is selected
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!