Is it possible to create a page that infinitely scrolls from top to top without going straight back to the top, but instead showing the bottom content below after reaching it? Imagine being able to scroll up and see the bottom above the top like a 3D cylinder page. Unfortunately, most resources only discuss blog-style infinite top-to-bottom scrolling.
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8" />
<title>infinitescroll</title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
<style>
body {
background: #000;
margin:0;
text-align: center;
overflow-x:hidden;
}
#frame {
width: 100%;
height: 100%;
}
.strip div {
position: relative;
text-align:center;
height: 200px;
}
.strip #div01 {
background-color:#942192;
}
.strip #div02 {
background-color:#5228cc;
}
.strip #div03 {
background-color:#0433ff;
}
.strip #div04 {
background-color:#009292;
}
.strip #div05 {
background-color:#00f900;
}
.strip #div06 {
background-color:#cafa00;
}
.strip #div07 {
background-color:#fffb00;
}
.strip #div08 {
background-color:#ffc700;
}
.strip #div09 {
background-color:#ff9300;
}
.strip #div10 {
background-color:#ff5100;
}
.strip #div11 {
background-color:#ff2600;
}
.strip #div12 {
background-color:#d82253;
}
</style>
</head>
<body >
<div id="container">
<div class="strip">
<div id="div01"><br/>↓ ↑</div>
<div id="div02"><br/>↓ ↑</div>
<div id="div03"><br/>↓ ↑</div>
<div id="div04"><br/>↓ ↑</div>
<div id="div05"><br/>↓ ↑</div>
<div id="div06"><br/>↓ ↑</div>
<div id="div07"><br/>↓ ↑</div>
<div id="div08"><br/>↓ ↑</div>
<div id="div09"><br/>↓ ↑</div>
<div id="div10"><br/>↓ ↑</div>
<div id="div11"><br/>↓ ↑</div>
<div id="div12"><br/>↓ ↑</div>
</div>
</div>
</div>
<script>
$('document').ready(function() {
$(document).scroll(function(){
if (document.documentElement.clientHeight + $(window).scrollTop() >= $(document).height()) {
$(document).scrollTop(0);
}
});
});
</script>
</body>
</html>