I see this progression bar at the top of their funnel which moves when scrolling down.
Can you help me with the code?
I see this progression bar at the top of their funnel which moves when scrolling down.
Can you help me with the code?
Hey @Yellow_Com ![]()
Yes! You can totally add a progress bar that moves as the user scrolls — and the good news is, it only takes a bit of HTML, CSS, and JavaScript.
Here’s how you can do it:
<div id="scroll-progress"></div>
#scroll-progress {
position: fixed;
top: 0;
left: 0;
height: 5px;
background: #00C49A;
width: 0%;
z-index: 9999;
}
<script>
window.addEventListener('scroll', () => {
const scrollTop = window.scrollY;
const docHeight = document.documentElement.scrollHeight - window.innerHeight;
const progress = (scrollTop / docHeight) * 100;
document.getElementById('scroll-progress').style.width = progress + '%';
});
</script>
That’s it! Now your funnel will show a clean scroll progress bar at the top.
Let me know if you want to customize colors or thickness! ![]()