<div class="vibe ani">🎅</div>
<div class="vibe ani faster">🎄</div>
<div class="vibe ani shaking">🎁</div>
@import url("https://fonts.googleapis.com/css2?family=Exo:wght@600&display=swap");
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
:root {
--background: #c0c0c0;
--background-shadow: -6px 6px 15px rgba(0, 0, 0, 0.5);
--text-shadow: 6px -6px 15px rgba(255, 255, 255, 0.8);
}
body {
margin: 0;
height: 100vh;
display: flex;
align-items: center;
justify-content: center;
background: var(--background);
gap: 20px;
}
.vibe {
color: var(--background);
font-size: 8em;
font-weight: bold;
font-family: sans-serif;
text-transform: uppercase;
text-shadow: var(--background-shadow), var(--text-shadow);
}
.ani {
animation: var(--animationName, pulse) var(--duration, 2000ms)
var(--timingFunctioin, ease-in-out) var(--delay, 0ms)
var(--iterationCount, infinite) var(--animation-drectioin, alternate)
var(--fillMode, forwards);
}
.ani.faster {
--duration: 500ms;
}
.ani.shaking {
--animationName: shake;
}
@keyframes pulse {
from {
transform: scale3d(1, 1, 1);
}
50% {
transform: scale3d(1.05, 1.05, 1.05);
}
to {
transform: scale3d(1, 1, 1);
}
}
@keyframes shake {
from,
to {
transform: translate3d(0, 0, 0);
}
10%,
30%,
50%,
70%,
90% {
transform: translate3d(-10px, 0, 0);
}
20%,
40%,
60%,
80% {
transform: translate3d(10px, 0, 0);
}
}
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.