How do I repeat part of an image using background-position and CSS sprites?

只愿长相守 提交于 2019-12-06 10:39:08

The short answer is this isn't possible (or at least, not worth it 99% of the time) with a sprite map, not with varying dimensions.

In most cases, a sprite-map isn't ideal for the repeating parts of a background, though it's excellent for the non-repeating portions.

Based on what you're after though, I'd take a look at the sliding doors approach to the problem, seems to fit what you want pretty well.

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