Jump to content
GreenSock

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

Image y movement within containing box

Recommended Posts

Hi,

 

I'm trying to get some images to have slight Y movement on scroll within each image containing div (overflow hidden).

 

Similar to how the images move on this site: https://cuberto.com/projects/datalight/

 

I just can't figure out what i'm doing wrong here. I've had a look through the parallax demo's, but nothing stands out. Anyone point me in the right direction here?

 

Thanks in advance.

 

 

See the Pen dypGjoN by alexkodr (@alexkodr) on CodePen

Link to comment
Share on other sites

Hey kodralex. 

 

yPercent is an invalid property of a ScrollTrigger. Instead you should create a tween with a ScrollTrigger and include the yPercent in the tween. We show how to do that sort of thing in this demo listed in the ScrollTrigger demos section.

  • Like 2
Link to comment
Share on other sites

Cheers for pointing me in the right direct Zach. I should be able to figure it out from here. Thanks

  • Like 1
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.
×