Created
July 7, 2015 08:36
-
-
Save JavaScript-Packer/9dee8df8d56d7ab446a1 to your computer and use it in GitHub Desktop.
Create animation in your web page with simple JavaScript. Simply moves up and down in a sine wave frequency. Live demo on http://jsfiddle.net/v7xr46jv/show/
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
| document.write('<h1 id="x">WHAK.com</h1>'); | |
| var is = 0; | |
| setInterval(function(r) { | |
| r = document.getElementById("x"); | |
| r.style.position = "absolute"; | |
| r.style.top = 50 * Math.sin(is) + 80 + "px"; | |
| is += .05; | |
| }, 1e3 / 30); |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This might work for you too @ 177 bytes: