/ Published in: CSS
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
/* CSS3 */ .preload { background-image: url(images/image_01.png), url(images/image_02.png), url(images/image_03.png), url(images/image_04.png), url(images/image_05.png); background-position: -9999px -9999px; background-repeat: no-repeat; } /* CSS2 */ .preload-01{ background: url(images/image_01.png) no-repeat -9999px -9999px;} .preload-02{ background: url(images/image_02.png) no-repeat -9999px -9999px;} .preload-03{ background: url(images/image_03.png) no-repeat -9999px -9999px;} .preload-04{ background: url(images/image_04.png) no-repeat -9999px -9999px;} .preload-05{ background: url(images/image_05.png) no-repeat -9999px -9999px;}
URL: http://forrst.com/posts/Using_CSS_instead_of_Javascript_for_Preloading_I-w0A