.bg { position: fixed; flex-direction: column; top: 0; left: 0; width: 100vw; height: 100vh; background-repeat: no-repeat #000; background-size: cover; background-position: left; z-index: -1; } .bg image{ width: 100%; height: 100%; }