1

I'm trying to remake scroll effect from this website : https://wemakefab.com/

gsap.registerPlugin(ScrollTrigger);
gsap.to(".scroll-content",{
    scrollTrigger:{
        trigger:".scroll-content",
        start:'top top',
        end:'bottom bottom',
        scrub:1.2,
        markers:true
    },
    y:-document.querySelector('.scroll-content').offsetHeight
})

It actually translate on scroll but it also create some huge white space at the end of the website. On the exemple they are putting css overflow:hidden on body but for me it block completly the scroll.

<div class="scroll-content">
            <section class="green"></section>
            <section class="blue"></section>
            <section class="green"></section>
            <section class="blue"></section>
            <section class="green"></section>
            <section class="blue"></section>
            <section class="green"></section>
            <section class="blue"></section>
            <section class="green"></section>
            <section class="blue"></section>
        </div>
Beatles BOB
  • 333
  • 1
  • 13
  • It's impossible for us to help without your CSS. Please make a [minimal, complete, and verifiable example](https://stackoverflow.com/help/minimal-reproducible-example). – Zach Saucier Sep 17 '21 at 16:16

1 Answers1

0

To fix this, I finally put a container around the scroll-content with an height of 100vh and it's all seems to work like a charm

Beatles BOB
  • 333
  • 1
  • 13
  • you probably could have not done that, taken your current div and maybe tried max-height: 100vh – Zuriel Sep 17 '21 at 12:36