Brodiero Posted June 9, 2020 Share Posted June 9, 2020 Hi all, I'm wanting to create a simple resize/reposition on scroll with an SVG. Something I thought would be simple and a good beginners lesson has turned into a headache and i've hit a wall. What i'm looking to do is start with the SVG center of screen scaled at 80vw and shrink down into a fixed sized and positioned header upon scroll, however I haven't even to to scrollTrigger yet! I feel like i'm approaching this the wrong way but i'm not experienced enough to know a better solution and would appreciate any steer I can get. Thanks See the Pen mdVVdyw by brodiero (@brodiero) on CodePen Link to comment Share on other sites More sharing options...
ZachSaucier Posted June 9, 2020 Share Posted June 9, 2020 Hey Brodiero, First off, make sure you're loading at least GSAP 3.3. Otherwise ScrollTrigger won't work. Once you've done that, you just need to add a ScrollTrigger to your tween. For example See the Pen zYrrYgN?editors=0010 by GreenSock (@GreenSock) on CodePen 1 Link to comment Share on other sites More sharing options...
Brodiero Posted June 9, 2020 Author Share Posted June 9, 2020 Thank you Zach! 🤦♂️ 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