Posted By

neal_grosskopf on 10/22/08


Tagged

css html


Versions (?)

Who likes this?

2 people have marked this snippet as a favorite

neal_grosskopf
joaosalless


CSS Image Preload - :hover Pseudo Selector Parent Of display: none Elements


 / Published in: CSS
 

URL: http://www.nealgrosskopf.com/tech/thread.asp?pid=23

A series of tests to determine the best way to preload css images on elements that by default are hidden.

  1. #preload { background-image: url(image.png); position: absolute; left: -9999px; } #preload { background-image: url(image.png); visibility: hidden; }
  2. #preload { background-image: url(image.png); background-repeat: no-repeat; background-position: -9999px -9999px; }

Report this snippet  

Comments

RSS Icon Subscribe to comments
Posted By: revmitcz on December 22, 2008

Mixing this method with multiple background images, as shown here : http://snipplr.com/view/2122/css-image-preloader/ seems to work perfectly in every browser I've tested (Firefox, Safari, IE, Opera).

Thanx!

You need to login to post a comment.