Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...
adamhopkins

Using GSAP for page scrolling effects

Warning: Please note

This thread was started before GSAP 3 was released. Some information, especially the syntax, may be out of date for GSAP 3. Please see the GSAP 3 migration guide and release notes for more information about how to update the code to GSAP 3's syntax. 

Recommended Posts

Hello,

 

I have been looking into getting a smooth scrolling effect using GSAP. After looking into Scroll Magic, I realised that what I want to achieve can be done using just using a GSAP timeline. I found something on Codepen which had a similar look to what I was after. I have tweaked this myself but have come to point where I need a bit of help/advice.

 

Basically, my webpage will consist of one page made up of 3 full width sections, each one being 100vh/% in height (so 3 separate panels).

  • The first panel will contain some information and a background image.
  • The second panel will also contain some content but will have a background video applied instead of an image
  • The third will be the same as the first, only with a different background image being used.

 

What I'm trying to achieve to have the panels transition into one another smoothly as you scroll. A simple opacity swap and scale tweak so that as you scroll down the page, panel 1 fades into panel 2 and then panel 2 fades into panel 3.

 

I am having some difficulty with my timeline I think. Currently the top 2 panels fade into each other quite well but I'm having difficulty adding the 3rd panel into the mix.

 

If anyone can offer any advice/help on this then it'd be much appreciated.

 

My codepen URL is

 

See the Pen ZobLYL by anon (@anon) on CodePen

 

 

 

 

 

Share this post


Link to post
Share on other sites

I'm not sure if others are seeing this but when I try to look at your pen it keeps reloading over and over preventing it from working.

Share this post


Link to post
Share on other sites
3 minutes ago, Visual-Q said:

I'm not sure if others are seeing this but when I try to look at your pen it keeps reloading over and over preventing it from working.

 

I have tweaked the background images to remain static rather thn loading a random image everytime. Hopefully that may have done the trick. Otherwise, it seems OK to me

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Warning: Please note

This thread was started before GSAP 3 was released. Some information, especially the syntax, may be out of date for GSAP 3. Please see the GSAP 3 migration guide and release notes for more information about how to update the code to GSAP 3's syntax. 


  • Recently Browsing   0 members

    No registered users viewing this page.

×