Basic Cascading Style Sheet(CSS) .bg__image { position: absolute; z-index: 0; left: 0; top: 0; right: 0; bottom: 0; } .object__fit { object-fit: cover; width: 100%; min-height: 100%; height: auto; }