The difference between a CSS background image and an HTML insert image

Source: Internet
Author: User

1. The image written in the CSS is in the form of a background image, and the HTML is inserted in the HTML of the different tags of the IMG, in the process of Web page loading, the image of the CSS background image will wait until the structure loading complete (after the content of the page is displayed) to start loading
2. Usually non-content of the picture is written in the CSS, if the content of the picture is written in the HTML page design direction is the presentation layer and Content layer separation, CSS tube performance, that is, the display effect, HTML tube structure, content structure division, so the code to be concise and easy to maintain some.
3. Browser reading page, CSS background and IMG Images will be downloaded to the local cache folder, CSS background and IMG Images can be reused in the Web page.
4. Picture as the background, when the picture is not loaded or failed to load, there will not be a picture of the placeholder tag, will not appear red fork.

The difference between a CSS background image and an HTML insert image

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.