body { background: url('bg11.jpg') #999; background-size: auto 100vh; background-position:center top; background-repeat: no-repeat; background-attachment: fixed; z-index: 1000; } body::before { content: ""; display: none; position: fixed; width: 100%; height: 100%; background:url('bg11mb.jpg') no-repeat left top; background-size: 100vw auto; top: 0; left: 0; } @media screen and (min-width: 1367px){ } @media screen and (max-width: 1366px){ body::before { display: block; } }