This is a well-know technique. If I remember right, credits goes to http://wellstyled.com/css-nopreload-rollovers.html

-Olivier

Mitchell Waite wrote:

I think this is a cool idea, but what is needed is an example so we can see how valuable it is.

A nice example would show the slow way vs your sliced way and see how they compare.

*From:* jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] *On Behalf Of *Alexander Graef
*Sent:* Thursday, July 26, 2007 3:22 PM
*To:* jquery-en@googlegroups.com
*Subject:* [jQuery] [Off-Topic] CSS Combine Images

Normally for each image on a webpage a separate request to the webserver is required, each taking as much as a hundred millisecond. Does not sound much, but can add up fast.

There is an easy way to overcome this by combining images into one single image and address the single images using CSS.

CSS for 1st image in row:

background-image : url(combined.png);

background-position : 0px -16px;

CSS for 2nd image in row:

background-image : url(combined.png);

background-position : 0px -32px;

I have been using this technique for some time now and always searched for a tool that would help me combine those images easily, but never succeeded. That is why I decided to build my own :)

This small tool allows you to choose an image directory and combine all png images into one single image. Its still in its alpha stage and far from feature complete ;)

Current restrictions:

- Only png images are allowed.

- Only one row.

- All source images must have the same size.

Planned features:

- Linux version

- Multiple rows

- Multiple source sizes

- Multiple input formats

- Image selection and sort options

- Drag & drop grid to place images

I am sure some of you might see some use for this.

Enjoy

Alexander

-----------------------------

portalZINE(R)- innovation uncovered

http://www.portalzine.de

dev.portalZINE(R) - all about development

http://dev.portalzine.de

pro.portalZINE(R) - customized experience

http://pro.portalzine.de


Reply via email to