CSS new Pseudo-class

Source: Internet
Author: User

CSS3 New Pseudo-class

: First-of-type p:first-of-typeSelect the first <p> element of its parent element per <p> element
: Last-of-type p:last-of-type selection belongs to its parent element <p> element per <p> element
: Only-of-type p:only-of-type selection belongs to its parent element only <p> element per <p> element
: Only-child p:only-child selection belongs to its parent element only element per <p> element
: Nth-child (n) p:nth-child (2) Select the second element that belongs to its parent element each <p> element
: Nth-last-child (n) p:nth-last-child (2) Start counting with elements
: Nth-of-type (n) p:nth-of-type (2) Select the second <p> element per <p> element belonging to its parent element
: Nth-last-of-type (n) p:nth-last-of-type (2) Start counting with elements
: Last-child P:last-child selects elements belonging to its parent element per <p> element
: Root:root Select document root element
: Empty P:empty Select no elements per <p> element (including text nodes)
: Target #news: Target #news element before selection
: Enabled input:enabled Select each enable <input> element
:d isabled input:disabled Select each disable <input> element
: Checked input:checked Select each selection <input> element
: Not (selector): Not (p) Select non-<p> element per element
:: Selection:: Selection Select the element part of the user selection

CSS new Pseudo-class

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.