How can I replace text with CSS using a method like this:
.pvw-title img[src*="IKON.img"] { visibility:hidden; }
Instead of ( img[src*="IKON.img"]
), I need to use something that can replace text instead.
I have to use [
]
to get it to work.
<div class="pvw-title">Facts</div>
I need to replace "Facts".
To start with, we wrap the text and assign it a class. This method requires very little markup. The text “Old Text” needs to be hidden first and a new text has to be positioned exactly where the old text was. To do so, we change the visibility of this text using CSS to hidden first.
You can replace text through CSS. Let's replace a green button that has the word 'hello' with a red button that has the word 'goodbye', using CSS. Note: We explicitly need to mark this as a block element, 'after' elements are inline by default.
Or maybe you could wrap 'Facts' round a <span>
as follows:
.pvw-title span { display: none; } .pvw-title:after { content: 'whatever it is you want to add'; }
<div class="pvw-title"><span>Facts</span></div>
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