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

Code Example 1

body {
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

Code Example 2

object-fit: cover;

Code Example 3

body {
  margin: 0;
}
img {
  display: block;
  width: 100vw;
  height: 100vh;
  object-fit: cover;
}

Code Example 4

#example1 {
  background: url(mountain.jpg);
  
    background-repeat: no-repeat;
  background-size: auto;

    }

#example2 {
  
    background: url(mountain.jpg);
  background-repeat: 
    no-repeat;
  background-size: 300px 100px;
}

Code Example 5

body {
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
}

Learn ReactJs, React Native from akashmittal.com