Jump to content
Search Community

ScrollTrigger with horizontal cards scroll

Roman-gsap

Recommended Posts

Posted

Hello

I am trying to make this effect.

Mobile view 400px wide. I have slider with 3 blocks and I have content blocks before and after slider. Slider should scroll horizontally.  I modeled this case here  . I use 3 elements here and maybe  i overcomplicate things and there is easy way to do this ?. 

See the Pen xbweadJ by goracio (@goracio) on CodePen.

Posted

Are you looking for a way to pin everything while the animation is playing horizontally? I would then wrap everything you want to pin, in this case .test-page-wrapper and use that as your pinned element. 

 

Hope it helps and happy tweening! 

 

See the Pen pvjBqdP?editors=1010 by mvaneijgen (@mvaneijgen) on CodePen.

  • Like 1
Posted

thanks - yea that is easier, i made 2 blocks finally with scrollTrigger. 

If i need to stack cards over each other, how i can add this effect ? i guess this would be not that easy )

Posted

Everything in GSAP starts with an animation, so first focus on the animation you want to happen then add that to ScrollTrigger to see how it works on scroll. I've written a guide all about this check 

 

 


Hope it helps and happy tweening! 

 

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