1

I would like to create the following effect, but do not know if it is achievable the way I envisage.

I would like a html page that is 2 or 3 times bigger than the screen and is scrollable (in itself nothing special). But when you reach the bottom I want it to automatically go back to the top seemlessly.

The end result I would like is if you held down the down arrow button the page would keep looping and scrolling down.

I want it to be continuous, not just jump back up to the top and start over.

1
  • Maybe jQuery´s .clone() is what you are looking for: api.jquery.com/clone Commented Nov 9, 2012 at 22:12

1 Answer 1

1

You need to make a second copy of your contents and stick it after the original. When "frame one" of the second copy gets to the edge of the screen, reset the positioning back to zero. This way it appears to be like a seamless loop.

Sign up to request clarification or add additional context in comments.

3 Comments

why not skip the second copy and just reset positioning back to zero at the maximum of the first copy? Also wont this jump and not be a smooth transition?
Imagine going right-to-left. One of four frames is visible. You slide to the third frame - so #3 slides left exposing #4. What happens next? There is no slide #5. So as #4 slides left - what do you see?
I’ve been looking around myself so I made a code example using this technique: codepen.io/vincentorback/pen/zxRyzj

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.