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