
Speeding marquee
Scroll, Text, Hover
An exercise from a Spanish course: a large sentence with two gaps and four words to choose from below. The chosen word jumps into the waiting gap, which opens to its width; the wrong one shakes its head and goes home, the right one lands and gains weight. Once the sentence is whole a wave runs through it and the translation arrives.
A folder that runs on its own: index.html, style.css, script.js and the libraries from a CDN. The React and Vue tabs hold the same demo as a ready component, which switches its animations off when it leaves the page.
<!doctype html>
<!--
"Fill-in-the-blank sentence" from Animorio · https://animorio.com
License: free on your own sites and your clients’ sites, paid work included.
Not for resale, redistribution, templates or code collections · https://animorio.com/en/license/
-->
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Fill-in-the-blank sentence of a language course with the words that jump into the gaps</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fontsource-variable/mona-sans@5.3.0/wdth.css">
<link rel="stylesheet" href="style.css">
</head>
<body>
<main class="stage">
<!-- an exercise of a language course: a sentence with two gaps and a bank of words; a chosen word jumps into
the next gap, which opens to its width; a wrong one shakes and goes home, the right ones gain weight -->
<section class="fill" data-fill aria-label="Complete the sentence">
<header class="fill__head">
<span class="fill__topic">Spanish, the past tense</span>
<span class="fill__dashes" data-dashes aria-hidden="true"><i class="is-full"></i><i class="is-full"></i><i></i><i></i></span>
</header>
<p class="sent" data-sent lang="es"></p>
<p class="tr"><span data-tr></span></p>
<div class="bank" data-bank></div>
<p class="sr" data-live aria-live="polite"></p>
</section>
<svg class="ghost" data-ghost viewBox="0 0 24 24" aria-hidden="true"><path d="M5 3.2 19.2 11l-6.3 1.6-3.3 5.9Z"></path></svg>
</main>
<script src="https://cdn.jsdelivr.net/npm/gsap@3.15.0/dist/gsap.min.js"></script>
<script src="script.js"></script>
</body>
</html>Change values, colours and text with the controls and watch the animation respond live. Or write in the code yourself. Then download the folder with your changes.
14 values to change
With the Animorio connector, Claude Code, ChatGPT, Cursor or VS Code take it from here, guide included, and fit it into your project. Paste this request:
Take “Fill-in-the-blank sentence” from Animorio and fit it into my siteA copy with position: fixed leaves the chip’s rectangle and reaches the gap’s: x goes straight with power2.inOut, y rises by 16 pixels and comes down in two halves, and together they draw an arc. The scale goes from the chip’s size to the sentence’s.
Before the flight the gap takes its final width for an instant (so the landing place is read correctly even if the line wraps), then goes back to 46 pixels and widens with back.out while the word arrives.
The right one animates font-weight up to HEAVY on Mona Sans’s variable axis. The wrong one makes five jolts in x, waits 0.28 seconds and leaves for its seat; only then can you choose again.
| Name | File | Default | What it changes |
|---|---|---|---|
ACCENT | script.js | #ff8a5c | The colour of the waiting gap and of the progress. |
RIGHT | script.js | #58d6a0 | The colour of the right word. |
WRONG | script.js | #ff5d6c | The colour of the wrong word. |
FLY | script.js | 0.55 | How many seconds the word’s jump lasts. |
HEAVY | script.js | 720 | The font weight the right word reaches. |
HOLD | script.js | 2.8 | Alone: how many seconds the finished sentence stays before starting over. |
LOOP | script.js | true | Left alone, a pointer does the exercise (with one mistake). |
On the page of a language course or an online school, as a demo of the method in a landing page’s hero, in a learning app. The sentence, the answers and the word bank sit in three lines at the top of the script.
The same card, as wide as the screen; the sentence drops to 22 pixels and wraps onto two lines, the chips sit on one or two rows. You tap the chip: no dragging.
The words do not fly: they appear in the gap already in place. The wrong one stays red for a moment and disappears, the right one is bold at once, the translation changes without rolling.
GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 6.1 KB; the libraries: GSAP 28 KB.
Tested on 16 November 2026
Use it in your own projects and in your clients’ projects. Do not resell it or redistribute it as is. GSAP stays under its own Standard license. Full license.
Support Animorio
Animorio stays free thanks to the people who support it. If you like, buy us a coffee: it helps us make the next animations.
You asked for
We made it for you: it’s in the library, with the preview, the Playground and the code to copy.
An animation you can’t find, or a site to take apart in the journal: tell us which. We pick the next ones from here.
With your account’s email and password.
or with your email
You’re signed in as .
With your account, you can download the zip of every animation and every pack, for free.