Reputation: 627
I found it from W3C. http://www.w3.org/TR/css3-content/#nesting
4.2.1. Nesting '::before' and '::after' pseudo-elements
The selector '::before::before' represents a pseudo-element contained at the start of a pseudo-element contained at the start of an element. For example, the following rules: div { content: 'A' } div::before { content: 'B'; } div::before::before { content: 'C'; } ...would result in the following rendering objects:
,-----------------------.
| ,---------. |
| | ,---. | |
| | | C | B | A |
| | `---' | |
| `---------' |
`-----------------------'
But it was not work in Chrome 30. http://codepen.io/tychio/pen/pLDqm
So I just want to ask how can use after
or before
to nest.
Upvotes: 5
Views: 5196