*{ margin: 0; padding: 0; } #wrap { position: absolute; top: 0; left: 0; right: 0; bottom: 0; background-color: #333; overflow: hidden; } #popup { position: absolute; width: 300px; height: auto; top: 50%; left: 50%; margin-left: -150px; margin-top: -100px; -webkit-perspective: 800px; -webkit-perspective-origin: 50% 50px; perspective: 800px; perspective-origin: 50% 50px; } .piece { background: rgba(95,144,222,0.5); float: left; } #popup h1 { position: absolute; text-align: center; width: 100%; height: 40px; top: 50%; margin-top: -20px; font-family: 'Noto Sans', sans-serif; color: #ccc; } .reverse { position: absolute; top: 20px; left: 20px; font-family: 'Noto Sans', sans-serif; color: #ccc; cursor: pointer; }