Is it possible to use repeating background images in sprites? [duplicate]

℡╲_俬逩灬. 提交于 2019-12-07 03:38:36

问题


Possible Duplicate:
CSS Sprites and repeating backgrounds

Are there any tricks that makes it possible to use sprite images as repeatable backgrounds?


回答1:


Yes you can but there are some limitations and it depends how the images are repeated. Here is how you would go about this depending on repeat direction:

Repeat: Don't think this is possible.

repeat-X: You would stack these vertically in your sprite sheet. You can only have one image per "row". All images must have the same width.

repeat-y: You would line the iages horizontally and have only one image per "column". All images must have the same height.

You are also limited to having separate sprite sheets for each repeat/no-repeat method.




回答2:


Nope, not really. Not even CSS3 offers an approach to do this properly (there is the proprietary image-rect property as shown in the duplicate question but it's not supported by all browsers).



来源:https://stackoverflow.com/questions/8083869/is-it-possible-to-use-repeating-background-images-in-sprites

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!