css image cover code example

Example 1: how to cover full image in css

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

Example 2: is there an img cover

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

Example 3: css cover

background-size: cover;

Example 4: css image cover

object-fit: contain;

Example 5: background: url("image/banner-image-1.jpg") no-repeat center top; background-size:cover;

-moz-backface-visibility: hidden;

Tags:

Html Example