JavaScript is disabled! Please enable JavaScript in your web browser!

Freestyle Academy of Communication Arts & Technology

1299 Bryant Ave, Mt. View, CA 94040 T 650-940-4680   F 650-961-1346
2 Required Classes: English and Design 3rd/Elective Class:  + Animation or Digital Media or Film

Font Size

+

-

Reset

Back to list of all examples

Useful Stuff About:

Preloading Images

Hate waiting for images to load? Well, there is a way to preload any image on your page so that transitions happen faster

Here's the CSS code


body:after {
content: url(1.jpg) url(2.jpg) url(3.jpg);/*Path relative to CSS file NOT html or PHP file*/
display: none;
}

This loads but does NOT display the images.

IMPORTANT: The path to the images are relative to the CSS document, NOT the html document

Read more about using the :after or :before CSS psuedo elements - Article 1 | Article 2