Pseudo-class selector

Of the type-of-1.first : First eg: selected in the first div p, p, and the first outside the div.

2.last-of-type (the last one)

Foreigners counts from 0

3.nth-of-type (number) number downwardly from eg: nth-of-type (1) select the second

4.ntn-last-of-type (number) number from the bottom egnth-last-of-type (1): penultimate 

5.first-child: a first sub-element, and it must be the first position, the position subject to the influence of other elements eg: p: first-child 

                   There may be a plurality of values, both when under a different parent, and in the first p

 

6.last-child

7.nth-child(number):

Using the above selector do:  you can select any of a commodity while two lines, used here as a clear margin

♥ nth-child (n) nth-of-type nth-last-of-type brackets which can put n (Select), 2n + 1 (odd) 2N (even-numbered) with 3N (multiple of 3)

 

 

Guess you like

Origin www.cnblogs.com/yzdwd/p/12149835.html