Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Spans VS :before and :after pseudo elements; when should I use which? Reply To: Spans VS :before and :after pseudo elements; when should I use which?

#243470
Atelierbram
Participant

In the case of CSS-animations, and you had to choose between the two, I would ultimately go for using a span, for historically better browser support. Can also insert the span with javaScript when wanting to keep the HTML-markup clean and semantic.