Twitsnip is a place to post code snippets and share them. Login with your existing Twitter account, if you don't have a Twitter account simply create on at www.twitter.com

Image Preloader

Image Preloader

0

In case you need to preload images before the loading of your page completes, use the following technique. Just add the images’ paths to the DIV class, and call the DIV in your HTML. The DIV will not be visible but the images will preload nicely.

div.loader{
background:url(images/hover.gif) no-repeat;
background:url(images/hover2.gif) no-repeat;
background:url(images/hover3.gif) no-repeat;
margin-left:-10000px;
}

Tags: image, preloader

Comments

No comments yet

Login to Twitter to comment