what are sprites and how do they get added to code?
Hi all,
Just been on my online banking and was checking out their new site design, right clicked and viewed one of the curved boxes on the page to see what kind of method they were using and was presented with a whole host of images that were entitled sprites?
Sprite are simply images that are used as resources.
They where really common is 2d games, 15 years ago.
In web design, the "sprite" method is used to reduce loading time.
Basically, a mask with a specific size is applied over the big image, to display only what is needed.
I mostly have seen this in use on rating scripts, where you can choose how many stars you want to give to an article/product.
Rather than loading another picture, it's just the position of the big image that is shifted to display another part.
as well as reducing http requests/download time, the same basic technique is used to get rollover buttons based which use images to work via css rather than javascript. e.g.: http://www.faridhadi.com/css-sprites-what-why-how/
Bookmarks