Any way to stretch the background image

I am trying to create a counter similar to here . What is calculated by stretching / compressing images.

But I prefer to use sprites than images for numbers. The only problem is that I don't see a way to animate a background image stretched using javascript. I know there is a css3 property for the background size, but is not available for the jquery animation method and is a bit strange.

Is there any other way I could do this? Is there a way to use image sprites instead of background images?

+3
source share
1 answer

You can wrap the IMG DIV tag with overflow = hidden and transfer it using the position property. This is not a good solution (too many elements), but it is what you need.

+1
source

All Articles