Skip to content

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.

fix: Typewriter Effect: See inside keeps the room of its Shown two thirds in caption while a play runs, so the text does not move at a play's start and end; Compare's text is smaller on phones so a long text does not make the box taller than Normal

matinc59a537cb127
diff --git a/animations/05-text-typography/typewriter-effect/index.html b/animations/05-text-typography/typewriter-effect/index.html
index 4ebdfded..4ef184d9 100644
--- a/animations/05-text-typography/typewriter-effect/index.html
+++ b/animations/05-text-typography/typewriter-effect/index.html
@@ -43,7 +43,10 @@
solid and faint letters wrap as one text; the cursor takes no room and cannot split a word. */
.stage[data-hb-mode="inside"]{flex-direction:column;gap:clamp(6px,1.5vw,10px);padding:clamp(10px,2.5vw,24px)}
.stage[data-hb-mode="inside"] .cap-solid,.stage[data-hb-mode="inside"] .cap-rate,
- .stage[data-hb-mode="inside"].posed .cap-pose,.stage[data-hb-mode="inside"].retype .cap-retype{display:block}
+ .stage[data-hb-mode="inside"] .cap-pose,.stage[data-hb-mode="inside"].retype .cap-retype{display:block}
+ /* "Shown two thirds in" keeps its room while a play runs, so the text does not move when a play starts and ends */
+ .stage[data-hb-mode="inside"] .cap-pose{visibility:hidden}
+ .stage[data-hb-mode="inside"].posed .cap-pose{visibility:visible}
.stage[data-hb-mode="inside"] .cap{align-self:flex-start;margin-left:max(0px,calc((100% - 640px)/2))}
.stage[data-hb-mode="inside"] .ahead{color:rgba(244,244,242,.3)}
.stage[data-hb-mode="inside"] .cursor{display:inline;position:relative;width:0;height:auto;margin:0;background:none}
@@ -62,7 +65,8 @@
.stage[data-hb-mode="compare"] .comb{display:block;position:relative;flex:none;height:14px}
.comb::after{content:'';position:absolute;left:0;right:0;bottom:0;height:1px;background:rgba(244,244,242,.3)}
.comb i{position:absolute;left:0;bottom:1px;width:3px;height:12px;border-radius:1px;background:#f4f4f2;visibility:hidden}
- @media(max-width:600px),(max-height:500px){.stage[data-hb-mode="inside"] .type-text{font-size:clamp(14px,4.4vw,17px)}}
+ @media(max-width:600px),(max-height:500px){.stage[data-hb-mode="inside"] .type-text{font-size:clamp(14px,4.4vw,17px)}
+ .stage[data-hb-mode="compare"] .type-text{font-size:clamp(13px,3.6vw,15px)}}
</style>
<link rel="stylesheet" href="../../../assets/css/demo-page.css?v=10">
<script src="../../../assets/js/demo-page.js?v=10" defer></script>