css
@import url("https://fonts.googleapis.com/css2?family=Lemonada:wght@700&display=swap");
*, *::before, *::after {
padding: 0;
margin: 0 auto;
box-sizing: border-box;
}
body {
background-color: #1f1f1f;
color: #444;
min-height: 100vh;
display: -webkit-box;
display: flex;
-webkit-box-pack: center;
justify-content: center;
-webkit-box-align: center;
align-items: center;
}
.continer {
position: relative;
min-width: 720px;
height: 360px;
border: 2px solid #fff;
border-radius: 4px;
-webkit-perspective: 800px;
perspective: 800px;
-webkit-perspective-origin: 150% -150%;
perspective-origin: 150% -150%;
overflow: hidden;
background-image: linear-gradient(190deg, #def, #9ab 53%, #789 53%, #456);
}
.step {
position: absolute;
overflow: hidden;
border: solid #aaa;
border-width: 1px 0;
}
.stepA, .stepC, .stepE, .stepG {
width: 80px;
height: 120px;
background-color: #fff;
-webkit-transform: rotateX(90deg);
transform: rotateX(90deg);
}
.stepA::after, .stepC::after, .stepE::after, .stepG::after {
color: #4b8;
}
.stepB, .stepD, .stepF {
width: 40px;
height: 120px;
background-color: #bcd;
-webkit-transform: rotateX(90deg) rotateY(90deg);
transform: rotateX(90deg) rotateY(90deg);
}
.stepB::after, .stepD::after, .stepF::after {
color: #264;
}
.step::after {
content: 'Climbing up the stairs';
position: absolute;
left: 400px;
font-family: 'Lemonada', cursive;
font-weight: bold;
font-size: 60px;
-webkit-filter: blur(1px);
filter: blur(1px);
white-space: nowrap;
-webkit-animation: textClimb 12s infinite linear;
animation: textClimb 12s infinite linear;
}
.stepA {
width: 320px;
top: 200px;
left: 460px;
}
.stepB {
top: 180px;
left: 440px;
}
.stepB::after {
-webkit-animation-delay: 0.4s;
animation-delay: 0.4s;
}
.stepC {
top: 160px;
left: 380px;
}
.stepC::after {
-webkit-animation-delay: 1.2s;
animation-delay: 1.2s;
}
.stepD {
top: 140px;
left: 360px;
}
.stepD::after {
-webkit-animation-delay: 1.6s;
animation-delay: 1.6s;
}
.stepE {
top: 120px;
left: 300px;
}
.stepE::after {
-webkit-animation-delay: 2.4s;
animation-delay: 2.4s;
}
.stepF {
top: 100px;
left: 280px;
}
.stepF::after {
-webkit-animation-delay: 2.8s;
animation-delay: 2.8s;
}
.stepG {
width: 400px;
top: 80px;
left: -100px;
}
.stepG::after {
-webkit-animation-delay: 6.8s;
animation-delay: 6.8s;
}
@-webkit-keyframes textClimb {
from {
left: 400px;
}
to {
left: -800px;
}
}
@keyframes textClimb {
from {
left: 400px;
}
to {
left: -800px;
}
}
.twitterLink {
position: fixed;
bottom: 0.5em;
right: 0.5em;
}
.twitterLink img {
width: 2em;
-webkit-filter: grayscale(100%);
filter: grayscale(100%);
-webkit-transition: -webkit-filter 0.25s;
transition: -webkit-filter 0.25s;
transition: filter 0.25s;
transition: filter 0.25s, -webkit-filter 0.25s;
}
.twitterLink img:hover {
-webkit-filter: grayscale(0%);
filter: grayscale(0%);
}