<div></div>
div {
  width: 100%;
  height: 100%;
  background-size: contain;
  background-image: url('https://images.unsplash.com/photo-1571931409696-83e2c9472763?ixlib=rb-1.2.1&q=85&fm=jpg&crop=entropy&cs=srgb&ixid=eyJhcHBfaWQiOjE0NTg5fQ');
  background-repeat: no-repeat;
  background-position: center;
}

body, html {
  height: 100%;
}
View Compiled
Run Pen

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.