Jump to content
adamhopkins

Using GSAP for page scrolling effects

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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

  • Recently Browsing   0 members

    No registered users viewing this page.