css精灵
时间:2010-11-15 来源:占志雄
代码
<div style=“float:left; width:120px; padding-left:20px; background:url(ico.png) left top no-repeat”>这里显示红叉</div>
<div style=“float:left; width:120px; padding-left:20px; background:url(ico.png) left -32px no-repeat”>这里显示绿勾</div>
<div style=“float:left; width:120px; padding-left:20px; background-image:url(ico.png); background-position:left top; background-repeat:no-repeat”>这里显示红叉</div>
<div style=“float:left; width:120px; padding-left:20px; background-image:url(ico.png); background-position:0 -32px; background-repeat:no-repeat”>这里显示绿勾</div>
看看页面中的显示!
相关阅读 更多 +
排行榜 更多 +