Posted By

neal_grosskopf on 10/22/08


css html

Versions (?)

Who likes this?

2 people have marked this snippet as a favorite


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

 / Published in: CSS


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  


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

Mixing this method with multiple background images, as shown here : seems to work perfectly in every browser I've tested (Firefox, Safari, IE, Opera).


You need to login to post a comment.