Jump to content
Search Community

Header Banner Animation, replace the first text with a new

Burhan.k test
Moderator Tag

Go to solution Solved by GreenSock,

Recommended Posts

I will replace the first text and show up the second hiding text. But I will pin it and not scroll the blue (demo) section up, so hard :)

 

Expected behavior: Scroll → opacity off the first-text going down to 0. Scroll more → opacity of the second-text, go to 100 and show up. If the second text is full visible, then scroll the second-text up and scroll down to blue section. Not before.

See the Pen xxjBEdp by digitaltim-de (@digitaltim-de) on CodePen

Link to comment
Share on other sites

  • Solution

A few notes/suggestions: 

  1. A critical piece of any ScrollTrigger page is setup. In this case, I think it makes the most sense to set things up with your text blocks on top of each other and then just animate them to/from while pinning the container. So a fair amount of this is just fixing your CSS/layout. 
  2. It's always best to just focus on your animation FIRST and then once you've got that worked out, THEN hook it up to ScrollTrigger. See 
  3. Opacity goes from 0 -> 1, not 0 -> 100 :)

Like this:

See the Pen PoeLWOe by GreenSock (@GreenSock) on CodePen

 

Have fun! 

Link to comment
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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...