Sunday, September 4, 2011

Advanced CSS3 Tutorial 7: Image Sprites


An image sprite is a collection of images put into a single image file.
A web page with loits of images can take very long to load and generates multiple server requests.

Here's an example of a Image Sprite picture:
http://www.w3schools.com/css/img_navsprites.gif

With CSS we specify it to show just the part we need:

img.home
{
width:46px;
height:44px;
background:url(img_navsprites.gif) 0 0;
}

4 comments: