Last active
August 29, 2015 14:15
-
-
Save JonathanMH/c1177779b9c3d6442691 to your computer and use it in GitHub Desktop.
50 Shades of Grey with CSS and JavaScript
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 colour = ''; | |
for (var i = 250; i > 0; i = i - 5) { | |
colour = 'background-color: rgb(' + i + ',' + i + ',' + i + ')'; | |
console.log(colour); | |
document.write('<div style="float: left;margin: 5px; width:90px;height:30px;' + colour+ '"></div>'); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment