How can I replace the contents of a link with CSS? -
is there way replace link's content using css only? not want hide link, replace text in it, e.g. changing <a href="">text</a>
<a href="">bla bla</a>
.
i know of after , before, still need link, can't hide <a>
tag.
you can use font-size:0
reset on pseudo-element.
a { font-size:0; } a:before { content:"new text"; font-size:1rem; }
<a href="">text</a>
note broswer (perhaps older chrome) won't let reduce font-size below values [4px?] (iirc)
Comments
Post a Comment