natas
natas

Reputation: 179

Pre-Loading Images

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

Upvotes: 6

Views: 551

Answers (5)

Travis
Travis

Reputation: 12379

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

Upvotes: 0

peirix
peirix

Reputation: 37771

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

Upvotes: 0

Andrew Hare
Andrew Hare

Reputation: 351748

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

Upvotes: 5

Related Questions