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: See inside fans the four layers out diagonally from the far sky to the near grass, each step taller than a label, so every label stays readable, uncovered and inside the box from phones to desktops
matinadf7a3b4b72f
diff --git a/animations/01-scroll-based/parallax-scrolling/index.html b/animations/01-scroll-based/parallax-scrolling/index.htmlindex 4d7f313b..0eb27b54 100644--- a/animations/01-scroll-based/parallax-scrolling/index.html+++ b/animations/01-scroll-based/parallax-scrolling/index.html@@ -37,20 +37,20 @@}.layer svg{width:100%;height:100%}.twin,.tag,.side{display:none}- /* See inside: the four layers pulled apart in depth, far at the back, each outlined and labeled with how far it moves.- The labels are larger on the far layers, which the depth draws smaller, so all of them read at about the same size. */- .stage[data-hb-mode="inside"] .layers{overflow:visible;background:none;perspective:1200px;perspective-origin:50% 25%}- .stage[data-hb-mode="inside"] .layer{outline:2px solid rgba(244,244,242,.6);outline-offset:-2px;rotate:y -34deg;scale:.58}- .stage[data-hb-mode="inside"] #l1{translate:-34% -4% -320px}- .stage[data-hb-mode="inside"] #l2{translate:-11% -1% -110px}- .stage[data-hb-mode="inside"] #l3{translate:11% 1% 100px}- .stage[data-hb-mode="inside"] #l4{translate:34% 4% 310px}+ /* See inside: the four layers fanned out from the far sky at the top left to the near grass at the bottom right, each+ outlined and labeled with how far it moves. Each step down is taller than a label, so no layer hides the label of the+ one behind it, even on a phone. The labels are drawn at 31px and shrink with their layer to about 13px. */+ .stage[data-hb-mode="inside"] .layers{overflow:visible;background:none}+ .stage[data-hb-mode="inside"] .layer{outline:2px solid rgba(244,244,242,.6);outline-offset:-2px;scale:.41}+ .stage[data-hb-mode="inside"] #l1{translate:-22% -27.75%}+ .stage[data-hb-mode="inside"] #l2{translate:-7.33% -9.25%}+ .stage[data-hb-mode="inside"] #l3{translate:7.33% 9.25%}+ .stage[data-hb-mode="inside"] #l4{translate:22% 27.75%}.stage[data-hb-mode="inside"] .tag{display:flex}- .tag{position:absolute;top:6%;left:5%;flex-direction:column;gap:.3em;padding:.4em .6em;border-radius:.4em;- background:rgba(11,11,13,.86);color:#f4f4f2;font-family:var(--hb-font);font-weight:600;font-size:var(--size);line-height:1.2}+ .tag{position:absolute;top:6%;left:5%;flex-direction:column;gap:.15em;padding:.3em .5em;border-radius:.4em;white-space:nowrap;+ background:rgba(11,11,13,.86);color:#f4f4f2;font-family:var(--hb-font);font-weight:600;font-size:31px;line-height:1.1}.tag span{font-weight:400;color:#d6d6da}.tag i{display:block;height:.3em;width:calc(var(--far,1) * 5em);border-radius:.15em;background:var(--ui-accent)}- #l1 .tag{--size:28px} #l2 .tag{--size:24px} #l3 .tag{--size:21px} #l4 .tag{--size:18px}/* Compare: the scene without parallax on the left and with it on the right, each named at its top */.stage[data-hb-mode="compare"] .frame{grid-template-columns:repeat(2,minmax(0,1fr));gap:2px}.stage[data-hb-mode="compare"] .twin,.stage[data-hb-mode="compare"] .side{display:block}