The Birthday card comes alive through three CSS keyframe animations defined in theDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/erickcruzmision-heart/birthday/llms.txt
Use this file to discover all available pages before exploring further.
<style> block of index.html. Each animation targets a different element — the card panel, the cake emoji, and the balloons — and together they give the page its playful, celebratory feel. Because all animation code lives in the same single file as the HTML, you can tune every timing value, travel distance, or easing curve by editing a handful of CSS properties without touching any build tool or external asset.
fadeIn (Card Entrance)
When the page loads, the entire card fades in from below. The@keyframes fadeIn rule starts the card transparent and shifted down 30 pixels, then transitions it to fully visible at its natural position.
.card element:
- Duration (
1s) — controls how long the entrance takes. Increase to1.5sor2sfor a more graceful reveal; decrease to0.4sfor a snappy pop-in. - Timing function (
ease) —easestarts fast and decelerates. Tryease-outfor a smoother landing, orcubic-bezier(0.22, 1, 0.36, 1)for a spring-like feel. - Delay — add a delay as a fourth value to hold the card off-screen briefly before it appears, useful if you add an intro overlay.
both fill-mode ensures the card stays invisible during the 0.2s delay rather than flashing into view before the animation starts.
bounce (Cake Emoji)
The cake emoji 🎂 bobs up and down continuously using the@keyframes bounce rule. The emoji moves vertically by 15px at the midpoint of each cycle.
.cake element:
-15px) — the negative Y value lifts the emoji upward. Increase the absolute number for a more exaggerated hop (e.g., -25px), or reduce it to -5px for a subtle pulse.
Duration (2s) — one full up-and-down cycle takes 2 seconds. A shorter duration (e.g., 1s) makes the bounce feel energetic and urgent; a longer one (e.g., 3s) feels lazy and relaxed.
Example — more dramatic bounce:
float (Balloons)
The four balloons drift upward and back on a slow, looping cycle using@keyframes float. Each balloon travels 20px upward at the halfway point of its animation.
.balloon:
float keyframes but start at different points in their cycle, creating a natural, wave-like motion:
| Balloon | Class | animation-delay |
|---|---|---|
| 1 | .b1 | 0s (no delay — starts immediately) |
| 2 | .b2 | 1s |
| 3 | .b3 | 2s |
| 4 | .b4 | 3s |
5s to 3s makes the balloons feel lighter and more buoyant. Increasing the travel to -35px adds a more dramatic drift without breaking the stagger effect.
Disabling Animations
Some users prefer reduced motion for accessibility or comfort reasons. Theprefers-reduced-motion media query lets you respect that preference without removing the animations from the stylesheet entirely.
<style> section in index.html. When the user has enabled the reduced-motion system preference, all three animations will be suppressed and the elements will render in their default static positions.
During development, you can freeze any animation without deleting it by setting
animation-play-state: paused on the element in DevTools — or simply set animation: none on the selector you’re inspecting. Both approaches leave the keyframe definition intact so you can re-enable the animation quickly.