Share Posted March 31, 2022 Hello, I'm hoping this isn't a really dumb question, but I'm trying to create a website where the user starts at the bottom of the page and scrolls up to the top. Using a to() function doesn't work very well as the object is already at the position I want to move it to if I'm scrolling upwards. I tried using from(), but this also does not work correctly, as it jumps back to the original set position between animations (see code pen). I could potentially use a set() between each section in the timeline, or use fromTo() and explicitly set the original position to be where the previous one stopped, but I was wondering if there is a better approach such as doing a to() in reverse or somehow starting the scroll animation at the bottom and finishing at the top? Thanks for any help/suggestions See the Pen BaJdbYy by jesseaudley (@jesseaudley) on CodePen Link to comment Share on other sites More sharing options...
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
Already have an account? Sign in here.Sign In Now