Check out example codes for "css last 3 childs". It will help you in understanding the concepts better.

Code Example 1

#something a:nth-last-child(-n+3) {
    /*declarations*/
}

Learn ReactJs, React Native from akashmittal.com