hugokhua Posted June 30, 2020 Share Posted June 30, 2020 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 More sharing options...
ZachSaucier Posted June 30, 2020 Share Posted June 30, 2020 Hey hugokhua and welcome to the GreenSock forums! Why not use position: sticky? Link to comment Share on other sites More sharing options...
hugokhua Posted June 30, 2020 Author Share Posted June 30, 2020 Can't believe I didn't think of that... it's always the simplest fix! Many thanks! 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