How to Replicate this Scroll Effect - Images Reveal on Scroll

Hi, I’m trying to create a scroll effect similar to this wix template, where the image reveals itself when you scroll. I’m not sure if snap scrolling is the correct term for this type of scroll, but I found a similar webflow template, but I didn’t know how to change it to work with images, so I followed this tutorial on youtube instead with the following code:

<style>
.scroll-snap-wrapper {
	scroll-snap-type: y mandatory;
}

.hero {
	scroll-snap-align: start;
}
.section-2 {
	scroll-snap-align: start;
}
</style>

However, not only does the scroll effect not work, it makes the overall scrolling on my site extremely slow, if it can even scroll at all. I’m not sure what went wrong and how to make a similar effect to the wix template I mentioned above. If you could help, I’d really really appreciate it, thank you!

https://preview.webflow.com/preview/amandas-portfolio-5ed93c?utm_medium=preview_link&utm_source=designer&utm_content=amandas-portfolio-5ed93c&preview=074278d6a54364ab69784d34059deeb3&workflow=preview

hi @y_zxn there is no snap involved. This effect is pretty basic as each section has a fixed background image.

here is CodePen with a simple example.

1 Like

Hi Stan, thank you so much for clarifying and for providing an example! It’s super helpful and I really appreciate it~ :smiling_face: :raised_hands: