Created
February 21, 2017 01:15
-
-
Save ardianta/abb5cf78e609202e614c34cc6fa6bad9 to your computer and use it in GitHub Desktop.
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
| var x = 0; | |
| var y = 0; | |
| setInterval(function(){ | |
| x -= 80 | |
| if( x == -320){ | |
| x = 0; | |
| y -= 80; | |
| } else { | |
| if(y == -240) | |
| { | |
| y = 0; | |
| } | |
| } | |
| document.getElementById('stiker').style.backgroundPositionX = String(x) + "px"; | |
| document.getElementById('stiker').style.backgroundPositionY = String(y) + "px"; | |
| }, 100); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment