Jump to content

Search In
  • More options...
Find results that contain...
Find results in...

random bars with scrolltrigger

Recommended Posts

I want to make all these bars css margin-top:100% at the beginning and set to margin-top:0 randomly via scrolltrigger...


how can I do that?



See the Pen zYwWeyX by ersenturgut (@ersenturgut) on CodePen

Link to comment
Share on other sites

I don't really understand what you're trying to do, but I'd definitely recommend animating transforms like "y" instead of margin-top if you can because they'll perform better. Here's what I thought you might be looking for: 

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


Hopefully that gets you moving in the right direction. 

  • Like 2
Link to comment
Share on other sites

Ji jack


Yes this is what I need exactly. But bars must start from the bottom of the container. And animate like this when scrolling...

Link to comment
Share on other sites

If all the bars need to start at the bottom of the container, I would think randomizing the duration would be the way to go. Or maybe I'm not understanding the desired result here. 


See the Pen 4c879a2ddc47285fe59044ca5fe04cb1 by PointC (@PointC) on CodePen

  • Like 5
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.