Created
March 23, 2019 14:17
-
-
Save modeverv/f3a56b30d5ed6940ef722b29c2e2c808 to your computer and use it in GitHub Desktop.
This file contains 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
change color | |
<script> | |
var bgcolor = 0x0; | |
var body = document.getElementsByTagName('body') | |
var interval = setInterval(function(){ | |
var value = "#" + ('000000' + (bgcolor++).toString(16)).slice(-6); | |
console.log(value); | |
body[0].style.backgroundColor = value; | |
if(0xffffff < bgcolor){ | |
bgcolor = 0x0; | |
} | |
},1); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment