Is there any possibilities to apply different background colour for ::before last word eg : `
<style>
.test::before{
content : 'stack overflow';
color: red;
}
</style>
<p class="test"></p>
` In this above mentioned example, I want add different colour for "overflow" text, any idea ?
To render the output you want to visualize, this could be a way:
.test::before {
content: 'stack';
}
.test::after {
content: ' overflow';
color: red;
}
<p class="test"></p>
But It's not appropriate. If your content is just decorative, why don't you put it into a <span>?