Let's say I have this element for displaying the website logo:
<div id="web-title">
<a href="http://website.com" title="Website" rel="home">
<span>Website Name</span>
</a>
</div>
The #web-title
would be styled with background:url(http://website.com/logohere.png)
, but how to properly hide the text Website Name
? As seen here: Hide text using css or here https://stackoverflow.com/a/2705328 , I've seen various methods to hide the text, such as:
#web-title span { text-indent: -9999px; }
or
#web-title span { font-size: -9999px; }
or
#web-title span { position: absolute; top: -9999px; left: -9999px; }
I've also seen some combine those three methods. But actually which one is the best practice to hide text effectively?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…