Created
May 7, 2012 17:40
-
-
Save leecrossley/2629200 to your computer and use it in GitHub Desktop.
There's no JavaScript or markup content :)
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>FuzzBuzz with CSS</title> | |
<style type="text/css"> | |
body{counter-reset:fuzzbuzz;font-family:arial;font-size:18px;} | |
div{padding:10px;margin:10px;width:80px;float:left;height:30px;color:#999;text-align:center;} | |
div:after{content:counter(fuzzbuzz);counter-increment:fuzzbuzz;} | |
div:nth-child(3n):not(:nth-child(5n)):after{content:"fuzz";color:red;font-weight:bold;} | |
div:nth-child(5n):not(:nth-child(3n)):after{content:"buzz";color:blue;font-weight:bold;} | |
div:nth-child(3n):nth-child(5n):after{content:"fuzzbuzz";color:purple;font-weight:bold;} | |
</style> | |
</head> | |
<body> | |
<div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div> | |
</body> | |
</html> | |
</style> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment