Jump to content
Search Community

Horizontal scroll animation

AndreasBP test
Moderator Tag

Go to solution Solved by mvaneijgen,

Recommended Posts

  • Solution

I had to move somethings around to get things to line up. Instead of using the horizontal xPercent I've used x and moving the total width of all slides (there was an extra slide with just the number "3" in it I have removed that from the HTML). I've set the end trigger to the bottom of the viewport, instead of the default top. I highly recommend turning on markers so you can see what ScrollTrigger is doing.

 

I've wrapped your ScrollTrigger in to a timeline, so it will be easier to see what is ScrollTrigger and what is the animation, this way we also give it a name (tl) and we can use it as the containerAnimation for the letters 

 

I’ve placed some comments in your JS to better explain things, please be sure to read through them! Hope it helps and happy tweening! 

 

See the Pen OJqjmKK?editors=0010 by mvaneijgen (@mvaneijgen) on CodePen

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...