Creating Infinite Horizontal Scrolling with Pause on Hover in Webflow

Implement the 'Infinite Horizontal Scrolling with Pause on Hover' feature in Webflow using custom CSS code.

Creating Infinite Horizontal Scrolling with Pause on Hover in Webflow

Access the template here.

Ensure the element structure is as follows:

Element Structure

Utilize the Webflow Designer to configure the CSS Variables.

  1. Set overflow: hidden and width: 100vw on the Section element.
  2. Set the Wrapper element to display: flex and justify-content: flex-start.
  3. Set the List element to flex-shrink: 0. Adjust the layout as per your requirement.
Configuring CSS Variables

Implement the infinite horizontal scrolling feature in Webflow by adding the following custom CSS code before the body tag or before the section element:

html
<style> .list { will-change: transform; animation: list-horizontal-scroll 20s linear infinite; } @keyframes list-horizontal-scroll { from { transform: translateX(0); } to { transform: translateX(calc(-100% - 32px)); } } .wrapper:hover .list { animation-play-state: paused; } </style>
html
<style> .list { will-change: transform; animation: list-horizontal-scroll 20s linear infinite; } @keyframes list-horizontal-scroll { from { transform: translateX(0); } to { transform: translateX(calc(-100% - 32px)); } } .wrapper:hover .list { animation-play-state: paused; } </style>

Adjust the class names list, list-horizontal-scroll, and wrapper as per your requirement.

Adjust the value 32px in transform: translateX(calc(-100% - 32px)); to match the gap size of your list.

If your list element is too short to fill the screen, duplicate it multiple times to fill the screen.