You can create an infinite marquee in Webflow using interactions and custom speed controls with a slider or input. Here’s how to build it and give users control over scroll speed.
Marquee Wrapper
. Set overflow: hidden and white-space: nowrap.Marquee Content
. Add all your marquee items (texts or images) inside this.Marquee Content
, go to the Interactions panel, and add a Page Load animation.Speed Slider
.Since Webflow interactions don’t support dynamic speed natively, use JavaScript to change animation duration based on slider input.
, and insert inline JS like:
const slider = document.getElementById('speed-slider');const marquee = document.querySelector('.marquee-content');let animation;function updateMarquee(speed) { const duration = 21 - speed; // Inverse to slow down at lower values marquee.style.animation = `scroll-left ${duration}s linear infinite`;}// Initial setupdocument.addEventListener("DOMContentLoaded", function () { updateMarquee(slider.value); slider.addEventListener('input', (e) => { updateMarquee(e.target.value); });});
Important:
.marquee-content
and #speed-slider
with the actual class name and ID used in your Webflow project.@keyframes scroll-left
in the Page Settings > Custom Code > Head as:@keyframes scroll-left { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }
Add CSS to keep the animation running smoothly:
Marquee Content
has display: inline-block
and is wide enough to hold all items + duplicates.To create an infinite marquee with adjustable scrolling speed in Webflow:
This method results in a seamless, speed-controlled marquee experience for your users.