Cloudio Posted December 27, 2021 Share Posted December 27, 2021 Hi, how do i change image (cup) on scroll? And how do i center it? i tried changing the start and end in the scrolltrigger function but after the first section the pin doesn't work anymore See the Pen BawJWpp by Cloudio12 (@Cloudio12) on CodePen Link to comment Share on other sites More sharing options...
OSUblake Posted December 27, 2021 Share Posted December 27, 2021 Here's a pen that does something similar. Notice how it pins the left content element and not everything inside of it. See the Pen YzyqVNe by GreenSock (@GreenSock) on CodePen 2 hours ago, Cloudio said: And how do i center it? Here's a tutorial on centering with flexbox. The parent of the image would need to have those flex properties. https://philipwalton.github.io/solved-by-flexbox/demos/vertical-centering/ 1 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