Background Image Merging

Source: Internet
Author: User

Using background image merging technology can reduce the number of images and reduce HTTP requests, which plays an important role in website acceleration. Advantages of background image merging:

A) It can be expanded to facilitate post-maintenance. It is easier to maintain when typographical changes occur.

B) Adaptive width reduces the page workload. Background Image merging can be combined with adaptive width, greatly reducing the number of pages and image size, and improving the page loading speed.

Example:

 

CSS style:

. AAA {Height: 34px; float: Left; Background: URL ("images/I .gif") 0-34px repeat-X ;}

. BBB {Height: 34px; Background: URL ("images/I .gif") 0 0 no-Repeat ;}

. CCC {Height: 34px; Background: URL ("images/I .gif") Right-68px no-Repeat; line-Height: 34px ;}

HTML code:

<Div class = "AAA">

<Div class = "BBB">

<Div class = "CCC"> menu </div>

</Div>

</Div>

 

Effect implementation:

Implementation principle: intercept the left, middle, and right sides of the navigation background image, and use the middle to tile the image. Then, place the left and right sides of the image, and use layer-3 nesting.

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.