CSS Sprites - 不仅仅是背景图片吗? [英] CSS Sprites - not only for background images?
本文介绍了CSS Sprites - 不仅仅是背景图片吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
是否可以使用CSS sprites作为前台图片 - 即用户应该点击并与之交互甚至可以打印的图片?
Is it possible to use CSS sprites for "foreground" images - i.e. images that users are supposed to click on and interact with and maybe even print?
使用CSS background-image属性,而不是使用... what?
Instead of using the CSS background-image property, instead you'd use... what?
谢谢!
〜S
推荐答案
您可以使用标准< img />
标签,并将其放置在具有有限高度/宽度的容器(如< div />
)中。然后使用相对定位或负边距来控制图像的位置。
You can use a standard <img />
tag and put it in a container (like a <div />
) with a limited height/width. Then use relative positioning or negative margins to control the position of the image.
这篇关于CSS Sprites - 不仅仅是背景图片吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文