Check out example codes for "how to add an image in css". It will help you in understanding the concepts better.

Code Example 1

div.mydiv:after {
  content: url(image.jpg); /*url of your image*/
}

or

div.mydiv {
   width:100px; /*width of your image*/
   height:100px; /*height of your image*/
   background-image:url('image.file');
}

Code Example 2

.element {
  background-image: url("imageFile.png");
}

Code Example 3

<img src="smiley.gif" alt="Smiley face" width="42" height="42" style="vertical-align:bottom">

    <img src="smiley.gif" alt="Smiley face" width="42" height="42" style="vertical-align:middle">

    <img src="smiley.gif" alt="Smiley face" width="42" height="42" style="vertical-align:top">

    <img src="smiley.gif" alt="Smiley face" width="42" height="42" style="float:right">

    <img src="smiley.gif" alt="Smiley face" width="42" height="42" style="float:left">

Code Example 4

/****************** How to set a background image? *********************/

div {
  background-image: url(path_to_image or url);
  background-size: 100% 100%;  /* This way, the image fills the entire space of the box */
  background-repeat: no-repeat; /* if the image will repeat or not, in case it is smaller than the box */
  background-position: center; /*  defines the image position inside the box */
  background-origin: content-box; /* defines where the image boundaries are positioned, for example, on the <div> border, or in the <div> content, ... (the background positioning area)*/
   
}

Learn ReactJs, React Native from akashmittal.com