CSS has an :nth-child selector, which lets you write styles that apply to child 3n or 5n for some whole number n. Then, you can use ::before and ::after selectors on that, which targets "pseudo-elements" before and after the one you selected, and you can specify a content property in the css to put text in them.
View all comments
Show parent comment
1
u/pahgawk Jul 22 '19
CSS has an :nth-child selector, which lets you write styles that apply to child 3n or 5n for some whole number n. Then, you can use ::before and ::after selectors on that, which targets "pseudo-elements" before and after the one you selected, and you can specify a content property in the css to put text in them.