Reverse Marquee
A line of words gliding to the right, against the usual ticker direction, full at any width, stopping under the mouse or with its Pause button.
Updated
This effect is part of Effect.Labs — 846 vanilla effects, some free, some premium. Gallery has 44 effects, including 6 free. Explore the category →
3 usage examples



How it works
The direction comes from one attribute: data-direction="right" on the root. The CSS answers with animation-direction: reverse: the rvmq-scroll animation is played backwards, the track starts one list length back and returns to zero. Remove the attribute, or write left, and the line heads left again.
Going the other way changes how it reads, and this was measured: what comes in at the left edge is the end. The last entry of the list passes first (in the demo: “Creative Motion”, then “Opposite Flow”, then “Reverse Direction”) and each group of words shows up by its last letters. So favour short items — a word, a price, a name — and when order matters, write the list back to front.
The list is written once. The script measures its width, copies it until the window is covered, plus once more, then sets the duration to hold 70 px per second (data-speed): 14 seconds for the 976 px of the demo list. It recounts when the area gets wider or when a script changes the list.
Worth knowing before you buy: the engine is the one in Basic Marquee, which takes the same attribute. Reverse Marquee is that ticker shipped facing the other way, in magenta, inside a 180 px frame.
Accessibility
- Stopping the line: a round 32 px button with
aria-pressed, by mouse, finger or keyboard (Tab, then Space or Enter); resting the mouse on the line holds it too. - Heard order, seen order: a screen reader reads the list as you wrote it, once (the copies carry
aria-hidden="true"), while on screen it passes in reverse order. If you flip the list for the eye, read it aloud again. - Links: Tab only visits the links of the original list. The link reached freezes the line at its starting point and gets a 2 px outline drawn inwards, so the window crops neither its top nor its bottom.
- Reduced animations: when the system asks for it, the line does not start; it shows the list once, without a button, and is moved by finger, wheel, or arrow keys after Tab.
- Contrast: magenta #d946ef on #0a0a0f, 5.7:1.
Browser compatibility
One CSS animation played backwards over an offset passed through a variable, 5 KB of script, no library. The most recent pieces: :focus-visible for outlines (Chrome 86, Firefox 85, Safari 15.4), flexbox gap (Chrome 84, Safari 14.1), ResizeObserver (Chrome 64, Firefox 69, Safari 13.1). Measured on 4 December 2026 in Chromium, Firefox and WebKit: 70 px/s to the right, two independent lines in one page, full line at 390 and 1,900 px, including inside a dir="rtl" page.
Without JavaScript, the list stays put, written once, and is dragged by hand. In an older browser the line still scrolls: it lacks the drawn focus outline and the gap between the line and the button; without ResizeObserver, the recount waits for the window to be resized.
The code
HTML structure to paste into your page (the CSS + JS come with your purchase):
<div class="fx-0188-root" data-speed="70" data-direction="right">
<div class="rvmq-band">
<div class="rvmq-viewport">
<div class="rvmq-track">
<ul class="rvmq-group" role="list">
<li>A short word</li>
<li><a href="/page">A link</a></li>
</ul>
</div>
</div>
<button type="button" class="rvmq-toggle" aria-pressed="false" aria-label="Pause"></button>
</div>
</div>
One-time payment, no subscription — the code is yours forever
Customize
Options passed to the API or data-* attributes:
| Option / property | Default | Effect |
|---|---|---|
data-direction |
right | right: to the right; left or no attribute: to the left. |
data-speed |
70 | Pixels travelled per second; the animation duration follows from it, whatever the length of the list. |
List (HTML — one <li> per item) |
4 two-word groups | Text, link or small block; the order of passage on screen is the reverse of the written order. |
--rvmq-color / --rvmq-size |
#d946ef / 1.5rem | Text colour and size (weight 600). |
--rvmq-space |
4rem | White space between two items, split into margins on either side. |
--rvmq-height / --rvmq-bg / --rvmq-padding |
180px / #0a0a0f / 1rem 0 | Frame around the line; auto, transparent and 0 to set it into your page. |
--rvmq-button / --rvmq-button-size |
rgba(255, 255, 255, .8) / 2rem | Tint and diameter of the Pause button. |
FAQ
data-direction="left" or "right". Reverse Marquee comes set to the right, at 70 px/s instead of 85, in magenta inside a 180 px frame. If you already own Basic Marquee, one attribute is enough to get this direction.dir="rtl" page the window sets its own building direction, so the band does not go empty, and the Pause button moves to the left, like the rest of the page. The right-hand direction is then the natural one: a sentence comes in by its beginning. Add dir="rtl" on the .rvmq-group list so the first item sits on the right.data-direction="left". Screen readers always follow the HTML order.