To improve your website’s design or user experience, you might need to preload some images for smooth hover or rollover. Instead of using javascript to preload the images, we can do that using CSS.
The HTML :
.... <body> <div class="preload"> <img src="IMAGE_TO_PRELOAD_1" /> <img src="IMAGE_TO_PRELOAD_2" /> <img src="IMAGE_TO_PRELOAD_3" /> </div> ... ... |
The CSS:
.preload { position:absolute; top:0px; left:0px; width:1px; height:1px; visibility:hidden; overflow:hidden; } |
EXPLAINATION
Demo:

The Code:
<div style="position:absolute;top:0px;left:0px;width:1px;height:1px;visibility:hidden;overflow:hidden;"> <img src="http://zenverse.net/wp-content/uploads/2009/06/csshover_2.jpg" /></div> <img src="http://zenverse.net/wp-content/uploads/2009/06/csshover_1.jpg" onmouseout="this.src='http://zenverse.net/wp-content/uploads/2009/06/csshover_1.jpg'" onmouseover="this.src='http://zenverse.net/wp-content/uploads/2009/06/csshover_2.jpg'" /> |


Hi,
Once again thanks for the tutorial
.-= Kish´s last blog ..Save $50 when you spend $250 or more =-.
The best solution I have found, congratulations, it’s clear, easy, and it dont pretend to be an extrange and bizarre trick.
how can i get it so that the images are right next to each other so i can use it as a menu.
@nate smith, hi, more explaination? =]