81 lines
1.8 KiB
CSS
81 lines
1.8 KiB
CSS
.marioday-container {
|
|
display: block;
|
|
position: fixed;
|
|
top: 0;
|
|
left: 0;
|
|
width: 100%;
|
|
height: 100%;
|
|
pointer-events: none;
|
|
z-index: 10000;
|
|
contain: strict;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.mario-wrapper {
|
|
position: absolute;
|
|
bottom: 5px;
|
|
left: -100px;
|
|
animation: mario-run 15s linear infinite;
|
|
will-change: left, transform;
|
|
}
|
|
|
|
.mario-runner {
|
|
width: 64px;
|
|
height: auto;
|
|
image-rendering: crisp-edges;
|
|
image-rendering: pixelated;
|
|
display: block;
|
|
will-change: transform;
|
|
}
|
|
|
|
.mario-jump {
|
|
will-change: transform;
|
|
animation: jump-arc 0.8s ease-in-out;
|
|
}
|
|
|
|
/* 8-bit coin styling */
|
|
.mario-coin {
|
|
will-change: transform;
|
|
position: absolute;
|
|
width: 32px;
|
|
height: 32px;
|
|
background-color: #ffd700;
|
|
border: 4px solid #b8860b;
|
|
border-radius: 50%;
|
|
box-shadow: inset 4px 4px 0 #fffbea, inset -4px -4px 0 #daa520;
|
|
animation: pop-up-arc 2s forwards;
|
|
}
|
|
|
|
.mario-coin::after {
|
|
content: '';
|
|
position: absolute;
|
|
top: 0;
|
|
left: 10px;
|
|
width: 4px;
|
|
height: 12px;
|
|
background: #daa520;
|
|
translate: 0 6px;
|
|
}
|
|
|
|
@keyframes mario-run {
|
|
0% { left: -100px; transform: scaleX(1); }
|
|
45% { left: 110vw; transform: scaleX(1); }
|
|
50% { left: 110vw; transform: scaleX(-1); }
|
|
95% { left: -100px; transform: scaleX(-1); }
|
|
100% { left: -100px; transform: scaleX(1); }
|
|
}
|
|
|
|
@keyframes pop-up-arc {
|
|
0% { transform: translateY(0) rotateY(0deg); opacity: 0; animation-timing-function: ease-out; }
|
|
20% { opacity: 1; }
|
|
50% { transform: translateY(-30vh) rotateY(360deg); opacity: 1; animation-timing-function: ease-in; }
|
|
90% { opacity: 1; }
|
|
100% { transform: translateY(20vh) rotateY(720deg); opacity: 0; }
|
|
}
|
|
|
|
@keyframes jump-arc {
|
|
0% { transform: translateY(0); }
|
|
50% { transform: translateY(-25vh); }
|
|
100% { transform: translateY(0); }
|
|
}
|