这是行不通的。仅显示跨度字符串。图像未加载。在 Firefox 中调试时,div#social a.fb {} 中没有条目。如果我删除background-image: url(../../images/job/facebook.jpg");
,则该类将加载完整条目。
<div id="social">
<span>follow us</span>
<a class="fb" title="Like us on Facebook" target="_blank" href="https://www.facebook.com/pages/Hiring-Steps/155650987881886">Facebook</a>
</div>
div#social a.fb {
background-image: url(../../images/job/facebook.jpg");
background-repeat: no-repeat;
display: inline-block;
height: 24px;
padding: 0 !important;
text-indent: -9999px;
width: 24px;
}