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

Code Example 1

p:last-child {
  font-size: 0.75em;
}

Code Example 2

li:last-child {
  background-color: lime;
}

Code Example 3

li:last-child {
    background-color: lime;
}

Learn ReactJs, React Native from akashmittal.com