fun Posted January 12, 2023 Share Posted January 12, 2023 I want pinning a box when left of screen hit the left of box, in a vertical scroll it work fine but with a horizontal scroll it's not working See the Pen poZPdpw by noX10M (@noX10M) on CodePen Link to comment Share on other sites More sharing options...
Solution GreenSock Posted January 12, 2023 Solution Share Posted January 12, 2023 You're not doing a real "scroll" horizontally - you're doing a containerAnimation. As the docs indicate, pinning is not supported for containerAnimations. However, with enough effort, you can "fake" it by counter-animating the x position like this: See the Pen YzjVLKP?editors=0010 by GreenSock (@GreenSock) on CodePen I hope that helps. 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