Image Marquee
An endless ribbon of photos: each image fills its 150 × 100 px frame, cropped without being distorted, and the ribbon stops under the mouse.
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
Each .immq-item is a 150 × 100 px frame with 8 px rounded corners (--immq-item-width, --immq-item-height). The <img> you put inside takes all the room: object-fit: cover keeps its proportions and cuts what sticks out, left and right for a wide photo, top and bottom for a portrait. As long as no image is there, the frame shows an indigo gradient and whatever text you left in it.
Because the size comes from the frame and not from the photo, the length of the ribbon is known before the first download: nothing jumps when images arrive, even without width and height attributes. Five frames and their 2 rem gaps make 910 px; the script adds the duplicates needed to cover the area and sets the duration from data-speed, 45 px per second.
It is a ribbon, not a slideshow: no arrows, no active image, no finger dragging. The photos travel on their own; resting the mouse on them, or the round button, holds them.
Accessibility
- Alternative text: write one
altper photo. The duplicates added by the script carryaria-hidden="true", so each image is announced only once. For a purely decorative ribbon, leavealt="". - Pause: a button with
aria-pressedat the end of the ribbon, triggered by click, finger, Space or Enter. Photos that move for more than five seconds must be stoppable (WCAG 2.2.2). - Clickable frames: write
<a class="immq-item">; with the keyboard, the frame reached is marked by a double ring, white then dark, drawn inside it, readable on a light photo as on a dark one. The ring stays whole, and a mouse click does not make the ribbon jump: the frame you aimed at is the one that opens. - No motion: if the user asked for fewer animations, the ribbon stays on its original photos, with no duplicates and no button, and is unrolled by hand or with the arrow keys.
Browser compatibility
object-fit: cover (Chrome 32, Firefox 36, Safari 10), one CSS animation and 5 KB of script with no dependency. The double focus ring needs :focus-visible (Chrome 86, Firefox 85, Safari 15.4). Measured on 4 December 2026 in Chromium, Firefox and WebKit with real <img> tags: a 150 × 100 px image in a 150 × 100 frame, full ribbon at 390 and 1,900 px, two independent ribbons, no error.
Script blocked: the photos line up once, still, in a row you scroll by hand. Older browser: the ribbon runs, so does the cropping; only the focus ring falls back to the browser's own.
The code
HTML structure to paste into your page (the CSS + JS come with your purchase):
<div class="fx-0190-root" data-speed="45" data-direction="left">
<div class="immq-band">
<div class="immq-viewport">
<div class="immq-track">
<ul class="immq-group" role="list">
<li><div class="immq-item"><img src="photo-1.jpg" alt="Description of the photo"></div></li>
<li><a class="immq-item" href="/gallery"><img src="photo-2.jpg" alt="Description of the photo"></a></li>
</ul>
</div>
</div>
<button type="button" class="immq-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 |
|---|---|---|
--immq-item-width / --immq-item-height |
150px / 100px | Frame format, hence the cropping: 3:2 by default, taller than wide for portraits. |
--immq-space |
2rem | Distance between two frames. |
Frames (HTML — .immq-item inside each <li>) |
5 “Image N” frames | One <img> per frame, as a <div> or a link <a>; written only once. |
.immq-item { border-radius } |
8px | Corner rounding, to change in your stylesheet: 0 for edge-to-edge photos, 50% with a square frame for medallions. |
data-speed / data-direction |
45 / left | Pace in pixels per second; right reverses the direction. |
--immq-height / --immq-bg / --immq-padding |
180px / #0a0a0f / 1rem 0 | Minimum height, background and padding of the block around the ribbon. |
--immq-button / --immq-button-size |
rgba(255, 255, 255, .8) / 2rem | Colour and size of the round button. |
FAQ
object-position on that image (for example object-position: 50% 20% to keep a face near the top), or give the frame the format of your photos with the two size variables.