Advantages and disadvantages of CSS Sprites.

Source: Internet
Author: User

Advantage 1: reduces http requests on webpages, greatly improving page properties; 2. Reduces image words; 3. Solves image naming problems, you only need to name the image of a set. You do not need to name every small element, which improves the webpage production efficiency. 4. Easy to change the style. You only need to modify the color or style of the image on one or more images. The style of the entire webpage can be changed. It is easier to maintain. Disadvantage 1: When merging images, You need to combine multiple images into an image in an orderly and reasonable manner, and leave enough space to prevent unnecessary background in the Section, the most painful thing is the Adaptive Page under a wide screen or high-resolution screen. If your picture is not wide enough, it is easy to break the background. 2. It is troublesome during development, you need to use photoshop or other tools to measure and calculate the exact location of each background unit. This is a needle, no difficulty, but it is very complicated. 3. It is troublesome to maintain it, if there are a few changes to the page background, it is generally necessary to change the merged image, it is best not to change the place, so as to avoid changing more css, if the original place can not be placed, you can only (preferably) Add the image to the bottom, so that the bytes of the image are increased and css needs to be changed. CSS Sprites is worth learning and applying. In particular, there are a bunch of ico (icons) on the page ). In short, we often have to weigh the pros and cons and decide whether to apply CSS Sprites. I have used several articles about CSS Sprites, basically explaining its principles and mechanisms clearly. What Are CSS Sprites? How to create CSS spritesCreating rolover Effects with CSS SpritesBuilding a Dynamic Banner with CSS SpritesHigh Performance Web Sites content about CSS Sprites 3.2. 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.