Jump to content
Search Community

ScrollTrigger how to make content scroll the opposite direction

Antdev test
Moderator Tag

Go to solution Solved by Trapti,

Recommended Posts

Hi there

I am making a vertical timeline that will have 10 content areas. 

I want it so that from the initial view of content area 1 that content area 2 scrolls down from the top rather than scrolling up from below content area 1.

 

The idea is you start at the start of a timeline that continues upward - it makes more sense when testing on a touch screen device.

 

Note the browser scroll bar will not be displayed as this will be packaged up as a full screen app with no browser elements visible.

 

Is there a clever way to do this in ScrollTrigger / GSAP?

 

Thanks in advance

 

Anthony

See the Pen ExoyxKZ by antdev (@antdev) on CodePen

Link to comment
Share on other sites

2 minutes ago, Trapti said:

Hey, I am not able visualize the problem, If you can explain little more will be helpful. But it seems like you can use Scrolltrigger's  direction  for this. 

Thank you for your reply. To try and explain it better. Imagine you are starting at the ground floor of a high rise building and are going to take the elevator upwards. So using touch screen functionality I would drag downwards and the first floor would scroll down into view. The ground floor would move downwards too and out of view.

 

I will look into the link you have provided - thanks again.

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