crmichael Posted January 11, 2023 Share Posted January 11, 2023 I want to replicate this border animation here - https://dft.websitestaging.live/get-started/ using GSAP with scroll triggered, so the borders animate when scrolled into viewport. I have both horizontal and vertical borders to animate. Link to comment Share on other sites More sharing options...
GreenSock Posted January 11, 2023 Share Posted January 11, 2023 That's pretty easy with ScrollTrigger. I'd recommend animating the scaleX of a regular 1px tall element rather than the border because it's cheaper for the browser to render (better performance): See the Pen bGjqXLK?editors=1010 by GreenSock (@GreenSock) on CodePen I'd recommend reading up on ScrollTrigger: https://greensock.com/docs/v3/Plugins/ScrollTrigger There are lots of demos here: https://greensock.com/st-demos Have fun! 2 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