2
嗨,我正在使用图像精灵显示各种图标。CSS Sprites - 如何隐藏图像的平衡部分
XHTML
<div class="ListIcons">
<ul>
<li class="Icon i-scissors">A list item using the <strong>i-scissors</strong> class.</li>
</ul>
</div>
的CSS
.Icon {background:url(../images/icons/icons.png) no-repeat top left;}
.i-scissors{ background-position: 0 -52px; width: 32px; height: 32px; }
问题
我的问题
如何隐藏正在显示的其他两个图像以及我想要的图像。
请帮助!
精灵
精灵形象,我现在用的就是这样的:
或者,':before'伪元素在这里可能会很有用,并会保持源代码更清晰。 (IE不可用于7,IIRC) – 2012-03-19 08:14:40