Last active
November 24, 2015 13:47
-
-
Save moonglum/3fc0e99622eec8729ac6 to your computer and use it in GitHub Desktop.
This is a FizzBuzz Solution I found on Twitter. It was always shared as a screenshot, so I typed it myself, to try it out ;) Source: https://twitter.com/ericwastl/status/667567483432402944
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
<html> | |
<head> | |
<style> | |
body { | |
counter-reset: n; | |
} | |
div:before { | |
counter-increment: n; | |
content: counter(n); | |
} | |
div:nth-child(3n):before { | |
content: "fizz"; | |
} | |
div:nth-child(5n):before { | |
content: "buzz"; | |
} | |
div:nth-child(3n):nth-child(5n):before { | |
content: "fizzbuzz"; | |
} | |
</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> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment