Reputation: 23563
Is CSS generated content only for text? For instance the code below shows the span as text, it doesnt create a new span.
.addbefore:before {
content: "<span>dfsd</span>";
}
Upvotes: 1
Views: 49
Reputation: 179046
Is CSS generated content only for text?
Yes.
pseudo-elements do not create new DOM elements within themselves, but they are treated as if they were new DOM elements within the element whose selector they match.
Upvotes: 2