Home > Web Front-end > CSS Tutorial > What are the new pseudo-classes in css3?

What are the new pseudo-classes in css3?

王林
Release: 2020-06-24 17:15:29
forward
3658 people have browsed it

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)].

What are the new pseudo-classes in css3?

(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!

Related labels:
source:juejin.im
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template