Jump to content
Search Community

Pin item which can still move horizontally

hugokhua test
Moderator Tag

Recommended Posts

Hello! I have an issue I can't seem to figure out, hopefully someone here might know something I don't!

 

In the codepen, there's a red and white section, and what I want is for the "about" to stick to the center of the screen while the right side, which currently has a lot of "hello"s, scrolls independently. My first thought was to use a scrolltrigger and simply pin it. However, this doesn't work, because I have a side navigation bar that pushes content to the right, and a pinned item would not move sideways correctly with the box. I currently have the word animating in from the side when you enter, and I want it to stay in the middle until the whole section reaches the bottom, at which time the word would follow upwards and out of view as if it was just a regular centered item. Any ideas or suggestions would be great!

 

Thanks,

Hugo

See the Pen RwrjGyJ?editors=1010 by hugo-hua (@hugo-hua) on CodePen

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...