Home page - Custome code
Where to find it: Home Page Settings > Custom Code > Before </body> tag
What it does:
This script powers the seamless, never-ending project loop on the homepage. It automatically duplicates your CMS projects and locks the browser's native scroll, replacing it with a custom mathematical scroll that feels incredibly heavy, smooth, and premium.
Note: For the best user experience, this infinite loop is intentionally disabled on mobile devices and tablets (screens under 991px), reverting to a native touch scroll.
How to customize it:
Scroll down in the code until you see the 🎛️ SMOOTH SCROLL SETTINGS section. You only need to touch these two numbers:
1. Scroll Speed (let scrollSpeed = 0.0004;)This controls how far the screen moves with one click of your mouse wheel.
- Make it faster: Increase the number (e.g.,
0.0008or0.001). - Make it slower: Decrease the number (e.g.,
0.0002).
2. Smoothness (let smoothness = 0.028;)This controls the "glide" or friction of the scroll after you stop moving your mouse wheel.
- 0.1 = Snappy and abrupt (stops instantly).
- 0.04 to 0.02 = Buttery smooth and heavy (Recommended).
- 0.005 = Feels like sliding on ice (takes a long time to stop).
⚠️ CRITICAL RULE: Never add negative margins to the .collection-item or .collection-list-wrapper in Webflow. If you want the images closer together, use the Flexbox "Gap" property on the .collection-list. Negative margins will break the infinite math and cause a visual jump!





.jpg)