Login   Register  
PHP Classes
elePHPant
Icontem

CSS sprite class: Generate sprite images and CSS to use image styles

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us

  Author Author  
Picture of Arturs Sosins
Name: Arturs Sosins <contact>
Classes: 22 packages by
Country: Latvia Latvia
Age: 26
All time rank: 821 in Latvia Latvia
Week rank: 20 Up1 in Latvia Latvia Equal
Innovation award
Innovation award
Nominee: 13x

Winner: 2x


  Detailed description   Download Download .zip .tar.gz   Install with Composer Install with Composer  
This class can be used to generate sprite images and CSS to use image styles to use the sprites in Web pages.

It can take a list of images and generates a single sprite image with all the images inside.

The class can also generate CSS style definitions to use in Web pages that need to use the images from the generated sprite image.

  Classes of Arturs Sosins  >  CSS sprite class  >  Download Download .zip .tar.gz  >  Support forum Support forum (2)  >  Blog Blog  >  RSS 1.0 feed RSS 2.0 feed Latest changes  
Name: CSS sprite class
Base name: css-sprite-class
Description: Generate sprite images and CSS to use image styles
Version: 1.0.0
PHP version: 5.0
License: GNU General Public License (GPL)
All time users: 1274 users
All time rank: 2783
Week users: 2 users
Week rank: 864 Up
 
  Groups   Rate classes User ratings   Trackback  
  Applications   Related pages   Files Files  

  Groups  
Group folder image HTML HTML generation and processing View top rated classes
Group folder image PHP 5 Classes using PHP 5 specific features View top rated classes
Group folder image Graphics Colors, images, charts and picture formats View top rated classes


  Innovation Award  
PHP Programming Innovation award nominee
October 2010
Number 2


Prize: One book of choice by Packt
Web pages with many images force the browser to make too many requests to the Web server.

An alternative solution to reduce the number of requests consists in assembling several images into a single sprite image. Then use CSS styles that define how to clip each image from the sprite and use the image in the Web pages.

This class implements a PHP solution to assemble sprite from a list of images and the necessary CSS styles to use the images in the pages.

Manuel Lemos

  User ratings  
Not enough user ratings

  Pages that reference this package  
Is there a bulletproof way to make PHP image sprite management easier?
You may want to try this PHP CSS sprite generator class:...

Latest pages that reference packages Latest pages that reference packages


  Applications that use this package  
No pages of applications that use this class were specified.
Add link image If you know an application of this package, send a message to the author to add a link here.

  Related pages  
CSS sprite class documentation
Documentation and example scripts in action

  Files folder image Files  
File Role Description
Files folder imageexamples (3 files)
Files folder imagetest_images (3 files)
Plain text file css_sprite.class.php Class Main class file

  Files folder image Files  /  examples  
File Role Description
  Accessible without login Plain text file css_code_example.php Example CSS code generation example
  Accessible without login Plain text file download_sprite_example.php Example CSS sprite forcing download example
  Accessible without login Plain text file image_output_example.php Example CSS sprite output example

  Files folder image Files  /  test_images  
File Role Description
  Accessible without login Image file elephpant.png Icon Test png file
  Accessible without login Image file php.gif Icon Test gif file
  Accessible without login Image file php.jpg Icon Test jpg file

Install with Composer Install with Composer - Download Download all files: css-sprite-class.tar.gz css-sprite-class.zip
NOTICE: if you are using a download manager program like 'GetRight', please Login before trying to download this archive.