Saturday, July 31, 2010

CSS sprites - mystery unfolded

CSS spirits, sorry it should be CSS sprites actually, are the small images that play a sweet role to provide some nice styles to the overall appearance of a web page. Yes, it is true that “Sprites” are considered as spirits that appear and vanish within fraction of seconds in a webpage. These CSS sprites are intended to catch attention of the visitors, sometimes with mouse hover or odd shapes of menu and navigation buttons; even spirit effects on positioning of links.

The mystery about the CSS sprites is nothing but sudden appearance of those on web pages. It is nothing but the intellectual play of web or graphic designers to present so many graphics in a grid or master image without sending the web server too many ‘http’ requests. In fact, sprites provide an opportunity to the graphic designers or the web designers to keep a visitor stuck to a page, instead of showing static images.

Whatever the case may be, it is true that the concept of sprites originated from the video games. How can I forget that I used to get extra points or the ‘stars’ for hitting some blocks or bricks on the path to reach the destination as a Mario Game player? Forget about it. This is a small example against the presence of sprites in the games.

Let us now see how in CSS sprites are doing little wonders. I mean to say why these are used for web pages. We are not going by the codes; rather we will talk the things in plain.

  • To create catchy menus, CSS sprite comes in use. Designers create small images (sprites) for curvy corners to avoid simple edge and gather the small pieces to make master image.
  • In the creation of mouse hover effects CSS sprites is used in the best way. Graphic designers create small images for structuring a back ground image and a foreground image. Then both the images are placed on each other. The movement of mouse calls one image before other.
  • Anywhere in a web page small buttons or graphics may be used with 2D or 3D effects. We designers are asked to represent some special attractions on the pages. So we again create sprites that easily grab attraction of the visitors.
  • To provide any web page background effect, small images are used. Instead of using larger images in a web page as background, small image slice are cut and rendered through ‘x’ axis or ‘y’ axis. This effort easily shows backgrounds quickly without causing delay in page load.
  • To stop the unnecessary use of javascripts for giving scroll or little dynamic effect, sprites are used. Javascripts take time to be called on the page or sometimes go missing. Dazzling effects can be given to links with CSS sprites.
  • CSS sprites make use of single file to minimize overall page load time for images. If you carefully read the points, I have mentioned ‘master image’. It is the CSS sprite that create bundle of small images and use them in a master image file which loads fast with single http request.

In short these are the main use of sprites, rather for these main reasons CSS sprites are still used in the web page design with graphical effects. Now the URI (Uniform Resource Identifier) has come and is making the use CSS sprites less only for page load timings. Whatever the case may be, sprites will remain to give little yet catchy effects to the web pages.

At least I, as a freelance graphic designer, love to use them, in my designs. All designs in my template shop have the potential to use the small image effects. So any time you want to hire website designer, ask him if he can give you some the spritely effects. Believe me those small images just pour dazzling effects to a webpage.

No comments:

Post a Comment

My Ping in TotalPing.com
Feedage Grade D rated
Preview on Feedage: web-design Add to My Yahoo! Add to Google! Add to AOL! Add to MSN
Subscribe in NewsGator Online Add to Netvibes Subscribe in Pakeflakes Subscribe in Bloglines Add to Alesti RSS Reader
Add to Feedage.com Groups Add to Windows Live iPing-it Add to Feedage RSS Alerts Add To Fwicki
Ping your blog, website, or RSS feed for Free