Jump to content
Search Community

Stack card issue

OnyxN

Go to solution Solved by mvaneijgen,

Recommended Posts

Posted

Hi All,

 

I faced issue on stack card design when scrolling. I want to show card by card . All card are overlap each other except first card. How to solve it? Here is my working file.

 

I want this kind of scroll effect. 

 

Please help me. Thanks alot.

image.thumb.png.2e470e7954d896013b84995e9cfc5b83.png

See the Pen mdZYzzy by OnyxJoy (@OnyxJoy) on CodePen.

  • Solution
Posted

The best thing to do when working with ScrollTrigger is to remove it! This seems counter intuitive, but ScrollTrigger is just animating something on scroll, so just focus on the animation at first and only when you're happy with the animation add ScrollTrigger back in. This way you can focus on one part at a time and it will save a lot of headache when debugging. 

 

With these kinds of things I like to make it simple, don't worry about optimising your code just build what needs to happen before you start optimising. I've got a whole post about his, I think this will really help you. 

 

 

 

Just write out what you think needs to happen and if you have a working version, see if you can see a pattern emerge and then fork your pen and try and implement that version. Hope it helps and happy tweening! 

 

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

  • Like 1
Posted

Hi @mvaneijgen,

 

Thank you ur advise. It is really help. I solved the problem and updated in codepen.

 

 

Cheers,

  • Like 2

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