.cover-left, .cover-top { background-color: #000; position: absolute; } body { background-color: #000 !important; } .cover-left { width: 100%; left: -100%; top: 0; bottom: 0; transition: 2.5s cubic-bezier(0, 0, 0, 0); } .covervis-left { left: 100%; } .cover-top { height: 100%; top: -100%; left: 0; right: 0; transition: 2.5s cubic-bezier(0.5, 0.8, 0.8, 0.5); } .covervis-top { top: 100%; } @media screen and (min-width: 768px) { .gallery-img { height: 100% !important; } } @media screen and (max-width: 768px) { .gallery-img { border: #000 solid 1.5px; } }