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

Code Example 1

body, html {
  height: 100%;
}

.bg {
  /* The image used */
  background-image: url("img_girl.jpg");

  /* Full height */
  height: 100%;

  /* Center and scale the image nicely */
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

Code Example 2

Background image resize

Code Example 3

/* One way */
background-size: cover;

/* Other option */
background-size: contain;

Code Example 4

background-size: 100px 50px; /* 100px wide, 50px tall */

Learn ReactJs, React Native from akashmittal.com