Jump to content
Search Community

ScrollTrigger image zoom in animation

Sukru test
Moderator Tag

Recommended Posts

Hey, is something like this what you're looking for?

 

See the Pen wvPVdBg?editors=0010 by mvaneijgen (@mvaneijgen) on CodePen

 

I've wrapped your animation in a scrollTrigger.batch to add a trigger on each element. You can play with the start and end positions to have it start earlier or later when scrolling. That is what the markers are for. Take a look at the docs if you want to learn more https://greensock.com/docs/v3/Plugins/ScrollTrigger/static.batch()

 

you can also add the following css to `.img_container` and then set `autoAlpha: 0` to the first animation to make them hidden at page load and only show them when animating

 

// css
.img_container{ visibility: hidden; }

// js
tl.from(batch, {y: 100, duration: 1, ease: "power2.outIn", autoAlpha: 0})

 

  • Like 4
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.
×
×
  • Create New...