Last active
April 18, 2017 00:18
-
-
Save citrusui/1b381e0f9c43be1ceaf920781f0d648f to your computer and use it in GitHub Desktop.
infinite scrolling https://htmlpreview.github.io/?https://gist.github.com/citrusui/1b381e0f9c43be1ceaf920781f0d648f/raw/18d39e7724b2984f51bcc14b9829c40adb3a0d21/test.html
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html> | |
<head> | |
<style> | |
::-webkit-scrollbar { | |
display: none; | |
} | |
.bg-container { | |
width: 1920px; | |
height: 1080px; | |
position: absolute; | |
top: 50%; | |
left: 50%; | |
transform: translate3d(-50%, -50%, 0); | |
overflow: hidden; | |
box-shadow: 0 30px 120px rgba(0, 0, 100, .5); | |
} | |
.bg-scroll { | |
opacity: 1; | |
position: absolute; | |
height: 250%; | |
width: 250%; | |
top: -50%; | |
left: -50%; | |
background: url(https://cloud.githubusercontent.com/assets/9056756/25090695/b364ea8a-2352-11e7-8257-d9acc9029fd2.png) repeat; | |
animation: backgroundScroll 16s linear infinite; | |
transform: rotate(55deg) scale(1); | |
transform-origin: center center; | |
} | |
@keyframes backgroundScroll { | |
0% { | |
background-position: 0 0; | |
} | |
100% { | |
background-position: 1080px -1080px; | |
} | |
} | |
</style> | |
</head> | |
<body> | |
<div class="bg-container"> | |
<div class="bg-scroll"></div> | |
</div> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment