以前我曾经这样称呼图像..
<asp:Image runat="server" SkinID="contanerLeftcor" ID="ContLeftCor" />
with contanerLeftcor 包含皮肤文件中图像的路径..
现在..
我已经创建了所有正在使用的图像的 Sprite 图像..
我有这样的 CSS 类..
.sprite-contaner-left-cor{background: url(csg-4d41213d57346.jpg) no-repeat top left;
background-position: -480px -1792px; width: 14px; height: 29px; }
我现在如何调用我的图像?
最佳答案
只需设置图像的 CssClass 属性即可。
<asp:Image runat="server" CssClass="sprite-contaner-left-cor" ID="ContLeftCor" />
关于asp.net - 雪碧图像CSS,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4814078/