<div class="section01"></div>
<div id="container">
  <section class="section02"></section>
  <section class="section03"></section>
  <section class="section04"></section>
  <section class="section05"></section>
</div>
html, body { height: 100%; margin: 0; }
#container { height: 100%; position: relative; overflow: hidden; }
section { width: 100%; height: 100%; position: absolute; }
.section01 { background: orange; width: 100%; height: 100%; }
.section02 { background: yellowgreen; }
.section03 { background: firebrick; }
.section04 { background: cornflowerblue; }
.section05 { background: seagreen; }
gsap.registerPlugin(ScrollTrigger);
gsap.defaults({ease: "power1", duration: 3});

const tl = gsap.timeline();
tl.from(".section03", {xPercent: -100})
  .from(".section04", {xPercent: 100})
  .from(".section05", {yPercent: 100});

ScrollTrigger.create({
  animation: tl,
  trigger: "#container",
  start: "top top", 
  end: "+=4000",
  pin: true,
  scrub: true,
  anticipatePin: 1
});

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

  1. https://unpkg.co/gsap@3/dist/gsap.min.js
  2. https://unpkg.com/gsap@3/dist/ScrollTrigger.min.js