CSS Sprite, a simple example of CSS sprites

Source: Internet
Author: User

CSS Sprite Generation Tool

Http://pan.baidu.com/s/1gdGQwiJ

Tool to integrate multiple images and create CSS.

HTML code

<style>. IMG{background:URL (img.png) no-repeat;}            . Lighthouse{Height:768px;width:1024px;background-position:0 0;}            . Koala{Height:768px;width:1024px;background-position:0-768px;}            . Tulips{Height:768px;width:1024px;background-position:0-1536px;}            . Penguins{Height:768px;width:1024px;background-position:0-2304px;}            . Desert{Height:768px;width:1024px;background-position:0-3072px;}            . Chrysanthemum{Height:768px;width:1024px;background-position:0-3840px;}            . Jellyfish{Height:768px;width:1024px;background-position:0-4608px;}            . Hydrangeas{Height:768px;width:1024px;background-position:0-5376px;}</style><imgclass= "img hydrangeas" />

Advantages

? Reduce the number of requests to the server when loading Web images
? Increase the load speed of the page
? Some bugs that decrease the mouse slide

Insufficient

? The biggest problem with CSS sprite is memory usage
? Affects the zoom function of the browser
? Puzzle Maintenance More Trouble
? Making CSS difficult to write
? CSS Sprite call picture cannot be printed
? Error using Sprites to affect accessibility

CSS Sprite, a simple example of CSS sprites

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.