[jquery sub-element Selector summary] Summary: Pseudo-Class child element Selector

Source: Internet
Author: User

Summarize:

child element selectors in pseudo-classes:

The first type:

: First-child

: Last-child

: Nth-child ()

: Nth-last-child ()

The second type:

: Only-child

: Only-of-type

The third type of:

: First-of-type

: Nth-last-of-type ()

: Nth-of-type ()

Characteristics:

Pseudo-class selectors are very characteristic:

1. Position: Directly through the pseudo-class selector directly to get the beginning of the end and the first few, usually and the target element in what position, can be from the positive count, also can be counted from, counting from 1 onwards

2. Type: Directly through the pseudo-class selector directly get the target element in the sub-element set of the location to achieve the requirements, can be from positive or reverse, counting from 1 onwards

3. Unique: Can directly select the number of pseudo-class selector directly | | The element of type (the target element is the only child element in the parent element)

4. And each type can be implemented in another way, not unique ...

5. Parameter passing is also characteristic, such as can realize even odd expression number

6. Really for their own words to express the ability to worry, really should write more practice, do not know in the future review, these heavenly book can also understand how much ....

[jquery sub-element Selector summary] Summary: Pseudo-Class child element Selector

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.