Check out example codes for "css odd even child". It will help you in understanding the concepts better.

Code Example 1

tr:nth-child(even) {background: #CCC}
tr:nth-child(odd) {background: #FFF}

Code Example 2

p:nth-child(2)
 {

     
 background: red;

 }

Learn ReactJs, React Native from akashmittal.com