Return to Snippet

Revision: 16654
at August 11, 2009 08:12 by SunilTee


Initial Code
#preloadImages {
       width: 0px;
       height: 0px;
       display: inline;
       background-image: url(path/to/image1.jpg);
       background-image: url(path/to/image2.jpg);
       background-image: url(path/to/image3.jpg);
       background-image: url(path/to/image4.jpg);
}

Initial URL

                                

Initial Description
This is a really useful techniques for preloading images on your website. Just place this code after the body tag in the CSS file. Everytime you refer to this image in your CSS file the image will be loaded from cache.

Initial Title
Preload images using CSS

Initial Tags
css, html, images

Initial Language
CSS