• Please allow 5 mins between posts.
  • Although email's are required they are hidden.
  • You can create an avatar that will appear everytime you post on a Gravatar enabled blog.
  • You can use the following tags in your post.
    [code][/code] [url][/url] [img][/img] [quote][/quote] [b][/b] [i][/i] [u][/u]

Multiple Backgrounds CSS3

With the new CSS3 method for displaying multiple backgrounds within a single element a new feature for preloading images has occured. Currently the main way is either to preload with a javascript script to include the files on page load, or to place these images within a html element and then set this element as display:none;

Two features I dislike about these methods:
1. Not all browsers either support or have javascript turned on.
2. With loading in hidden html elements, the number of elements needed can grow to quiet a large amount.

Thus with the new multiple backgrounds options we are now able to preload multiple images within one html element and set this element as hidden.

div#images {
background: url('image1.jpg'), 
	url('image2.jpg'), 
	url('image3.jpg'),
	url('image4.jpg');
	display: none;
}
The number of preloaded images within one HTML element is now vastly increased. Not entirely sure how much I like this feature as It still requires an unused HTML tag, but it's a slightly nicer solution to css preload than was available before.

No Comments