SBob Posted June 12 Share Posted June 12 Hi, I'm trying to make an effect for my website but I'm not getting the animation on point. The idea is that the video would stop scaling when the red box is in the middle of the screen and that the video is in the red box. See the Pen wvbredR by SermonB (@SermonB) on CodePen Link to comment Share on other sites More sharing options...
GreenSock Posted June 12 Share Posted June 12 Hm, you're locking the top of the video to 100px down from the top of the screen, though, so logically it wouldn't necessarily intersect with the red box when the red box hits the center of the viewport. If you want it to unpin when it's centered vertically in the red, perhaps this is what you're looking for? See the Pen rNgGRNB?editors=1010 by GreenSock (@GreenSock) on CodePen 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