Share Posted July 29, 2021 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? thanks... See the Pen zYwWeyX by ersenturgut (@ersenturgut) on CodePen Link to comment Share on other sites More sharing options...
Share Posted July 29, 2021 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. 2 Link to comment Share on other sites More sharing options...
Author Share Posted July 29, 2021 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 More sharing options...
Share Posted July 29, 2021 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 5 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now