Created
July 2, 2015 21:08
-
-
Save ozio/babf7aa38f600bae7e52 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
var els = document.querySelectorAll('*'); | |
for (var i = 0, l = els.length; i < l; i++) { | |
var color = [ | |
parseInt(Math.random() * 255), | |
parseInt(Math.random() * 255), | |
parseInt(Math.random() * 255) | |
]; | |
els[i].style.backgroundColor = 'rgb(' + color.join(',') + ')'; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment