DEV Community

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';
}
Enter fullscreen mode Exit fullscreen mode
Collapse
 
renegadecoder94 profile image
Jeremy Grifski

Haha I love that you can do this in CSS.