Review and consolidate the use of CSS3 's Nth-child (). 2015-10-20
1 definitions on the world of:
: The Nth-child (n) selector matches the nth child element that belongs to its parent element, regardless of the type of the element.
n can be a number, a keyword, or a formula.
2 usage examples
A is used to process a specific child element of an element,
For example, P:bth-child (3) {color:red;} means that the 3rd child element of the P element is set to a red font.
b for interlaced discoloration
Odd and even are keywords that can be used to match sub-elements with an odd or even number subscript (the subscript for the first child element is 1).
C Use the formula (an + b). Description: Indicates the length of the period, N is the counter (starting at 0), and B is the offset value
Indicates setting 1,3,5 ... cardinal item color is red
3 jquery selector: Nth-child (even) and: difference of even
A using nth-child (even)
Page effect: 1-even line background is red
b Use: Even
Page Effect: 0-even line background is red
Css3:nth-child () Selector