176 web animation techniques, each a live demo with plain settings and a ready-made prompt for your AI assistant. No dependencies, no build step.
HTML ai-promptsanimationcss-animationsfrontendgithub-pagesjavascriptmicrointeractionsmotion-designno-dependenciesreferencescroll-animationui-animationweb-animationweb-developmentwebgl
fix: Card Deck Swipe: more room between the pile and its buttons (the pile sits a little higher and smaller)
matinc8424d7e15ec
diff --git a/animations/04-micro-interactions/card-deck-swipe/index.html b/animations/04-micro-interactions/card-deck-swipe/index.htmlindex e7b3b69f..57f0f2db 100644--- a/animations/04-micro-interactions/card-deck-swipe/index.html+++ b/animations/04-micro-interactions/card-deck-swipe/index.html@@ -28,8 +28,8 @@.decks{flex:1;min-height:0;display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr)}.deck{position:relative;min-width:0;container-type:size}.pile{position:absolute;inset:0}- /* A card: about 60% of the box's width at most, turning around a point below its bottom edge (transform-origin) */- .card{--tb:translateY(calc(var(--i) * 12px)) scale(calc(1 - var(--i) * .05));position:absolute;left:50%;top:50%;width:min(70cqh,60cqw);aspect-ratio:4/5;translate:-50% -50%;+ /* A card: about 60% of the box's width at most, a little above the middle so the pile's back edges keep clear of the buttons, turning around a point below its bottom edge (transform-origin) */+ .card{--tb:translateY(calc(var(--i) * 12px)) scale(calc(1 - var(--i) * .05));position:absolute;left:50%;top:calc(50% - 12px);width:min(64cqh,60cqw);aspect-ratio:4/5;translate:-50% -50%;display:flex;flex-direction:column;overflow:hidden;border-radius:14px;background:#17171c;box-shadow:0 10px 26px rgba(0,0,0,.45);container-type:inline-size;transform-origin:50% 130%;transform:var(--spread,translate(0)) var(--tb);touch-action:pan-y;cursor:grab;transition:transform calc(.3s * var(--sp)) cubic-bezier(.2,.8,.2,1),opacity calc(.3s * var(--sp))}@@ -47,7 +47,7 @@.like{left:8%;color:var(--like);transform:rotate(-14deg)}.nope{right:8%;color:var(--nope);transform:rotate(14deg)}.spring .stamp{transition:opacity calc(.3s * var(--sp))}/* Nope, Undo and Like: round buttons under the pile, 48px to touch */- .acts{display:flex;justify-content:center;gap:18px;padding:8px 0 12px}+ .acts{display:flex;justify-content:center;gap:18px;padding:12px 0 12px}.act{display:grid;place-items:center;width:48px;height:48px;border-radius:50%;border:1px solid rgba(255,255,255,.14);background:#17171c;cursor:pointer}.act svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:2.4;stroke-linecap:round;stroke-linejoin:round}.nope-b{color:var(--nope)}.undo-b{color:var(--undo)}.like-b{color:var(--like)}