Check out example codes for "css image sprites". It will help you in understanding the concepts better.

Code Example 1

/******************** How to use image sprites? ************************/
/* For this, you need to position the image so that only a segment of it 
is revealed. This technique also allows you to zoom in on parts of the 
image */

    <meta charset="UTF-8" />
    <title> Title </title>

      #window_1 {
        height: 120px;
        width: 117px;
        background: url("image_path") 0px 0px; /* coordinates of the upper left point: x = 0 and y = 0 */

      #window_2 {
        height: 150px;
        width: 100px;
        background: url("image_path") -300px -200px; /* coordinates of the upper left point: x = -300 and y = -200 (we use negative numbers) */


    <div id="window_1"></div>
    <div id="window_2"></div>


Learn ReactJs, React Native from