how to hide text on a tag without removing text inside :before pseudo element css -
i hide text inside tag, keep text inside before pseudo element, without change html , without javascript
<a href="#">text hidden</a>
css
a:before{ content: "i need show up" }
this wipes out of text
a { text-indent: -999em; display: inline-block; }
little fiddle https://jsfiddle.net/5wrs1ft1/
i don't think it's possible, unless wrap text element <span>
.
a > span { display: none; } a:before { content: "i need show up" }
<a href="#"><span>text hidden</span></a>
Comments
Post a Comment