Created
November 29, 2014 16:34
-
-
Save roachhd/bc019b5a97fe7c7b9897 to your computer and use it in GitHub Desktop.
fun color change style
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
html { margin: 0; padding: 0; border-top: 10px solid cyan; } | |
body { width: 100%; max-width: 900px; margin: 20px auto; font-family: monospace; font-size: 16px; line-height: 1.5em; } | |
a { color: blue; text-decoration: none; } | |
h1 { font-size: 4em; } | |
h1 em { color: magenta; font-size: .3em; } | |
h3 { font-size: 3em; line-height: .7em; } | |
ul { margin: 20px 0; padding: 0; list-style: none; } | |
li { margin: 1em 0; color: #666; text-align: right; } | |
li a { display: block; padding: 10px 20px; background: cyan; color: black; text-align: left; font-size: 1.2em; } | |
li a:hover { color: white; background: black!important; /* lol so important yo */ } | |
#links section.me { float: left; width: 400px; max-width: 100%; margin: 20px; } | |
img.right { float: right; margin: 0 0 10px 10px; border: 10px solid lime; } | |
footer, | |
.pals { clear: both; } | |
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
(function(){ | |
var neonColors = [ | |
'#ff00ff', | |
'#00ffff', | |
'#00ff00', | |
'#ffff00', | |
'#ff0000', | |
'#0000ff', | |
'#7920FF', | |
'#FD0987', | |
'#FF3300', | |
'#FF6EC7', | |
'#00FF66', | |
'#4D4DFF', | |
'#67C8FF', | |
'#7BFB2D', | |
'#AAFF00', | |
'#FF00AA', | |
'#AA00FF', | |
'#FF7F00', | |
'#228DFF', | |
'#ff6d38', | |
'#f90000', | |
'#fd8b25', | |
'#25d7fb', | |
'#7920ff', | |
'#fe51c3', | |
'#ff9072', | |
'#ff63a2', | |
'#e3e641', | |
]; | |
var links = document.getElementById('links'); | |
var linkItems = links.getElementsByTagName('a'); | |
for ( var i = 0; i < linkItems.length; i++ ) { | |
linkItems[i].style.backgroundColor = neonColors[ Math.floor(Math.random() * (neonColors.length + 1)) ]; | |
} | |
})(); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment