CSS ::before and ::after pseudo-elements allow you to insert “content” before and after any non-replaced element. This effectively allows you to show something on a web page that might not be present in the HTML content. In this article, I’ll walk you through seven different examples that showcase how ::before or ::after can be used to create interesting effects.

10m read timeFrom css-tricks.com
Post cover image
Table of contents
Styling Broken imagesCustom blockquoteIcon Bullet ListAnimated toggle switchGradient borderGradient overlaysCustom radio buttonsWrapping up
2 Comments

Sort: