DEV Community

loading...

Discussion on: Fizz Buzz in Every Language

Collapse
stephanie profile image
Stephanie Handsteiner

CSS

ol {
   list-style-type: inside;
}

li:nth-child(3n), li:nth-child(5n) {
   list-style-type: none;
}

li:nth-child(3n):before {
   content: 'Fizz';
}

li:nth-child(5n):after {
   content: 'Buzz';
}
Collapse
renegadecoder94 profile image
Jeremy Grifski Author

Haha I love that you can do this in CSS.