Image preload

Is there a way to preload images only with html / css?

+6
html css image
source share
5 answers

Yes, you can. There are many textbooks in this topic - here is one of them .

+5
source share
+2
source share

If you include the URL in CSS, the image will be loaded as the .css file is loaded into the document.

0
source share

Yes there is. There is a method called CSS sprites.

This basically works by loading one large image, and then only displaying specific sections of the image as needed. Obviously, this method is not suitable for any solution, but it is good for many.

A List Apart has an excellent tutorial on this subject: List aspect: Articles: CSS sprites: crop image kiss of death

0
source share

All Articles