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: home page styles: message box width, no animated shadows, one-line Copy prompt and place labels, more room for the shapes
matinafd7fb8daa94
diff --git a/index.html b/index.htmlindex c4e6c51d..238d66c1 100644--- a/index.html+++ b/index.html@@ -103,7 +103,7 @@ button,input{font:inherit;color:inherit}.fl1{left:6%;top:60px;width:26px;height:26px;border-radius:50%;background:var(--c7)}.fl2{left:14%;top:240px;width:22px;height:22px;border-radius:6px;background:var(--c1);animation-delay:-2s;animation-duration:8s}.fl3{left:2%;top:320px;width:30px;height:30px;border-radius:50%;border:5px solid var(--c5);animation-delay:-4s}-.fl4{right:8%;top:80px;width:28px;height:28px;background:var(--c2);clip-path:polygon(50% 0,100% 100%,0 100%);animation-delay:-1s;animation-duration:9s}+.fl4{right:8%;top:56px;width:28px;height:28px;background:var(--c2);clip-path:polygon(50% 0,100% 100%,0 100%);animation-delay:-1s;animation-duration:9s}.fl5{right:16%;top:280px;width:16px;height:16px;border-radius:50%;background:var(--c3);animation-delay:-3s}.fl6{right:2%;top:350px;width:24px;height:24px;border-radius:7px;border:5px solid var(--c4);animation-delay:-5s;animation-duration:8s}@keyframes fl{0%,100%{transform:translateY(0) rotate(0)}50%{transform:translateY(-16px) rotate(14deg)}}@@ -131,7 +131,7 @@ button,input{font:inherit;color:inherit}.places{display:grid;grid-template-columns:repeat(9,minmax(0,1fr));gap:20px;margin-top:44px}.place{display:flex;flex-direction:column;align-items:center;padding:0;border:0;border-radius:24px;background:none;text-align:center;cursor:pointer}.p-btn{--pa:#2f5bea}.p-text{--pa:#d6336c}.p-img{--pa:#7048e8}.p-bg{--pa:#e8890c}.p-menu{--pa:#0c8f7f}.p-load{--pa:#e8590c}.p-intro{--pa:#2b9a4a}.p-scroll{--pa:#3b5b8c}.p-page{--pa:#9c36b5}-.art{position:relative;display:grid;place-items:center;width:100%;height:108px;border-radius:22px;background:color-mix(in srgb,var(--pa) 12%,var(--surface));overflow:hidden;transition:transform .35s var(--ease),box-shadow .25s}+.art{position:relative;display:grid;place-items:center;width:100%;height:108px;border-radius:22px;background:color-mix(in srgb,var(--pa) 12%,var(--surface));overflow:hidden;transition:transform .35s var(--ease)}@media(hover:hover){.place:hover .art{transform:translateY(-4px);box-shadow:var(--shadow-2)}}.place[aria-pressed="true"] .art{box-shadow:0 0 0 3px var(--ink)}.pl-name{margin-top:12px;font-size:15px;font-weight:700;line-height:1.2}@@ -204,11 +204,11 @@ button,input{font:inherit;color:inherit}.gcount{font-size:15px;font-weight:400;color:var(--muted)}/* cards */-.card{position:relative;display:flex;flex-direction:column;padding:10px;border-radius:20px;background:var(--surface);box-shadow:var(--shadow);transition:transform .35s var(--ease),box-shadow .35s var(--ease)}+.card{position:relative;display:flex;flex-direction:column;padding:10px;border-radius:20px;background:var(--surface);box-shadow:var(--shadow);transition:transform .35s var(--ease)}.card:has(.title a:focus-visible){outline:3px solid var(--brand);outline-offset:3px}.stage{position:relative;aspect-ratio:16/10;border-radius:12px;overflow:hidden;background:#08080a}.pv{position:absolute;inset:0;width:100%;height:100%;transition:transform .6s var(--ease);--ink:#f4f4f2;--ink-dim:#adadb2;--muted:#77777e;--line:rgba(255,255,255,.085)}-.tag{position:absolute;z-index:1;left:10px;top:10px;padding:5px 11px;border-radius:999px;background:rgba(255,255,255,.94);color:#16161b;font-size:12px;font-weight:700;line-height:1.2}+.tag{position:absolute;z-index:1;left:10px;top:10px;max-width:calc(100% - 10px);padding:5px 11px;border-radius:999px;background:rgba(255,255,255,.94);color:#16161b;font-size:12px;font-weight:700;line-height:1.2;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.results.no-tags .tag{display:none}.meta{display:flex;flex-direction:column;flex:1;padding:14px 8px 6px}.title{font-size:18px;font-weight:700;letter-spacing:-.01em;line-height:1.25}@@ -216,7 +216,8 @@ button,input{font:inherit;color:inherit}.title a::after{content:"";position:absolute;inset:0;z-index:2;border-radius:20px}.desc{flex:1;margin-top:6px;font-size:15px;line-height:1.5;color:var(--ink-2)}.acts{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:14px}-.copy{position:relative;z-index:3;display:inline-flex;align-items:center;gap:8px;min-height:44px;padding:0 16px;border-radius:999px;border:1px solid var(--line);background:var(--surface);font-size:14px;font-weight:600;cursor:pointer;transition:background .2s,border-color .2s,color .2s}+.copy{position:relative;z-index:3;display:inline-flex;align-items:center;gap:8px;min-width:0;max-width:100%;min-height:44px;padding:0 16px;border-radius:999px;border:1px solid var(--line);background:var(--surface);font-size:14px;font-weight:600;white-space:nowrap;cursor:pointer;transition:background .2s,border-color .2s,color .2s}+.copy-l{min-width:0;overflow:hidden;text-overflow:ellipsis} /* the label never wraps; only if it cannot fit at all does it end in an ellipsis */.copy.done{background:var(--ok);border-color:var(--ok);color:#fff}.try{display:inline-flex;align-items:center;gap:6px;padding-right:6px;font-size:15px;font-weight:700;color:var(--brand)}.try .i{transition:transform .25s var(--ease)}@@ -249,7 +250,7 @@ button,input{font:inherit;color:inherit}.fine{margin-top:32px;text-align:center;font-size:15px;color:var(--muted)}.foot{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:12px 24px;padding:36px 0 44px}.foot-t{font-size:15px;color:var(--muted)}-.toast{position:fixed;z-index:60;left:50%;bottom:24px;display:flex;align-items:center;gap:10px;min-height:52px;max-width:calc(100% - 32px);padding:0 18px;border-radius:16px;background:var(--ink);color:var(--bg);font-size:15px;font-weight:600;box-shadow:0 12px 32px rgba(22,22,27,.28);opacity:0;transform:translate(-50%,16px);pointer-events:none;transition:opacity .25s,transform .25s var(--ease)}+.toast{position:fixed;z-index:60;left:50%;bottom:24px;display:flex;align-items:center;gap:10px;min-height:52px;width:max-content;max-width:calc(100% - 32px);padding:0 18px;border-radius:16px;background:var(--ink);color:var(--bg);font-size:15px;font-weight:600;box-shadow:0 12px 32px rgba(22,22,27,.28);opacity:0;transform:translate(-50%,16px);pointer-events:none;transition:opacity .25s,transform .25s var(--ease)}.toast.show{opacity:1;transform:translate(-50%,0)}.toast .ok{display:inline-grid;place-items:center;width:28px;height:28px;flex:none;border-radius:50%;background:#1f9d57;color:#fff}.toast .ok .i{width:16px;height:16px}@@ -264,7 +265,7 @@ button,input{font:inherit;color:inherit}/* phone */@media(max-width:600px){.top{min-height:60px}- .nav .lnk,.gh{display:none}+ .top .nav .lnk,.gh{display:none}.brand{gap:10px;font-size:15px}.mark{width:28px;height:28px}.pill{gap:8px;padding:7px 13px;font-size:13px}@@ -287,7 +288,7 @@ button,input{font:inherit;color:inherit}.pinrow{display:flex;align-items:center;gap:8px}.pin-back{display:grid;place-items:center;width:44px;height:44px;flex:none;border-radius:999px;border:1px solid var(--line);background:var(--surface);cursor:pointer}.pin-search{display:flex;align-items:center;flex:1;min-width:0;padding:0 14px;border-radius:999px;border:1px solid var(--line);background:var(--bg)}- .pin-search:focus-within{border-color:var(--brand)}+ .pin-search:focus-within{border-color:var(--brand);box-shadow:0 0 0 3px color-mix(in srgb,var(--brand) 22%,transparent)}.pin-search .i{color:var(--muted)}#q2{flex:1;min-width:0;min-height:44px;margin-left:8px;border:0;background:none;font-size:16px;outline:none;-webkit-appearance:none;appearance:none}.pchips{display:flex;gap:8px;margin-inline:calc(-1 * var(--gut));padding-inline:var(--gut);overflow-x:auto;scrollbar-width:none}@@ -299,7 +300,7 @@ button,input{font:inherit;color:inherit}.card{padding:6px;border-radius:16px}.title a::after{border-radius:16px}.stage{border-radius:10px}- .tag{left:6px;top:6px;padding:3px 8px;font-size:11px}+ .tag{left:6px;top:6px;max-width:calc(100% - 6px);padding:3px 8px;font-size:11px}.meta{padding:10px 6px 4px}.title{font-size:15px}.desc{margin-top:4px;font-size:13px;line-height:1.45;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}@@ -317,10 +318,15 @@ button,input{font:inherit;color:inherit}/* beyond the design: widths and places it does not show */@media(max-width:760px){.gh{display:none}} /* the top bar fits from 601px up */-@media(max-width:1199px){.fl2,.fl5{display:none}} /* the two shapes that would sit on the 720px search box below 1200px */+@media(max-width:1238px){.fl2,.fl5{display:none}} /* the two shapes that would crowd the 720px search box below 1239px */.acts{flex-wrap:wrap} /* a narrow card puts Try it under Copy prompt */#q{text-overflow:ellipsis} /* a placeholder that does not fit ends in an ellipsis, not cut by the button */-.foot .lnk{display:inline-flex} /* the footer links stay on phones (the phone rule above hides the top bar's) */+@media(min-width:601px) and (max-width:700px){.copy{gap:6px;padding:0 10px;font-size:13px}.tag{padding:4px 9px;font-size:11px}} /* three cards across leave the pill about 135px and the preview about 150px: Copy prompt and the place label stay on one line with room to spare */+@media(max-width:360px){ /* two narrow cards across: the pill and the place label on the preview stay on one line */+ .copy{gap:5px;padding:0 4px;font-size:12px}+ .copy .i{width:16px;height:16px}+ .tag{left:5px;top:5px;max-width:calc(100% - 5px);padding:3px 6px;font-size:10px}+}/* ── preview library ── */.pv *{will-change:transform,opacity}@@ -856,6 +862,7 @@ button,input{font:inherit;color:inherit}.art *,.art *::before,.art *::after,.pill-dot::after{animation-play-state:paused!important}.float{display:none}.card,.card:hover,.card:hover .pv,.place:hover .art{transform:none;transition:none}+ .toast{transform:translate(-50%,0);transition:opacity .25s} /* the message fades in place, it does not slide */}/* -- previews: session additions -- */