Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

206
Views
Horizontal Scrolling With multiple images

I stumbled across this codepen and was wondering if there is away to have multiple images, side by side, in the horizontal scroll section. So in stead of just one div with bg-iamge, maybe just simple img tags inside the div? Would it be possible to embed videos in there as well?

Any help is appreciated, I couldn't figure it out myself. :(

See codepen here: Link

<h1 class="header-section">Scroll down to see a horizontal scroll section</h1>


<div class="massiveImage"></div>

<h1 class="header-section">Now we're back to regular scrolling</h1>


<header>
   <a href="https://greensock.com/scrolltrigger">
     <img class="greensock-icon" src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/16327/scroll-trigger-logo-light.svg" width="200" height="64" />
  </a> 
</header>



.massiveImage {
  height: 100vh;
  width: 400vw;
  background-size: cover;
  background-position: center;
}
.header-section {
  padding-bottom: 50vh;
  margin-bottom: 0;
}


gsap.registerPlugin(ScrollTrigger);

gsap.set(".massiveImage", {backgroundImage: `url(https://source.unsplash.com/random/${innerWidth * 3}x${innerHeight})`})

gsap.to(".massiveImage", {
  xPercent: -100, 
  x: () => innerWidth,
  ease: "none",
  scrollTrigger: {
    trigger: ".massiveImage",
    start: "top top",
    end: () => innerWidth * 3,
    scrub: true,
    pin: true,
    invalidateOnRefresh: true,
    anticipatePin: 1
  }
});
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!