Multiple Pseudo Elements

Is it possible to get multiple pseudo-elements in one object like this?

div { content: 'A' } div::before { content: 'B'; } div::before(2) { content: 'C'; } div::before(3) { content: 'D'; } 

I tried, but it does not work .

+8
css css3 pseudo-element
source share
1 answer

This syntax consists of an old level 3 module of finished content . This does not work because no one has implemented any part of this module. In fact, the specification itself has been abandoned for many years due to lack of interest and implementation and pending rewriting with low priority .

It is impossible to say whether this function will remain in the rewriting, because no one wants to implement it. And honestly, I do not hold my breath ...

Your only solutions here are to use extra markup instead of pseudo-elements or find another way to create this content using a script.

+7
source share

All Articles