CSS Image Preloading

Here is a way to preload images that will be used in a page with just plain old CSS, no JavaScript required.

Example Code: CSS Selector

div#ImageLoader {display:none}



Example Code: HTML

21 <div id=“ImageLoader”>

22 <img src=http://www.mysite.com/images/home_hover.jpg&#8221; width=“1” height=“1”/>

23 <img src=http://www.mysite.com/images/coin_hover.jpg&#8221; width=“1” height=“1”/>

24 <img src=http://www.mysite.com/images/logout_hover.jpg&#8221; width=“1” height=“1”/>

25

26