Check out example codes for "customize highlight color website". It will help you in understanding the concepts better.

Code Example 1

::-moz-selection { 
background-color: #BA9EB0; 
color: #ffffff;
}
::selection {
background-color: #BA9EB0;
color: #ffffff;
}

Learn ReactJs, React Native from akashmittal.com