tags:

views:

126

answers:

6

Is there a way to pre-load images just using html/css?

+4  A: 

Yes you can. There are many tutorials available on this topic - here is one of them.

Andrew Hare
A: 

If you include an url in your CSS, the image will be downloaded as the .css file is loaded into the document.

peirix
A: 

Yes: http://perishablepress.com/press/2008/04/15/pure-css-better-image-preloading-without-javascript/

Thanks... that url was already linked to in the above (first) answer.
natas
A: 

Yes, there is. There's a technique called CSS sprites.

It basically works by loading one big image and then only displaying certain sections of the image as needed. Obviously, this technique isn't practical for every solution but it's good for many.

A List Apart has a great tutorial on this: A List Apart: Articles: CSS Sprites: Image Slicing's Kiss of Death

T Pops
We have recently embraced this and it is GREAT!
n8wrl
took a look at this also. It seems very interesting.
natas
A: 

Thanks for the responses everyone!

natas
A: 

Or even easier: <link rel="prefetch" href="path to image">.

Ms2ger