I'm confused about the pseudo-elements behaviour. I learn from w3c The :before and :after pseudo-elements
So, my question is as follows:
html :
<div id="breadcrumbs">this is a old content.</div>
css:
#breadcrumbs:before {
content:"this is a new content."
}
I want to know whether the new content insert inside the div tag or outside.
<div id="breadcrumbs">this is a new content.this is a old content.</div>
this is a new content<div id="breadcrumbs">this is a old content.</div>
Which one is the right? Thanks a lot in advance!
This slideshow mentions this very question and is a very good bit of information in any case.
According to Chris Coyier it would be the first
<div id="breadcrumbs"><span>this is a new content.</span>this is a old content.</div>
and here's the official documentation
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With