1. The images written in CSS are in the form of a background image, while the HTML is written in
Label form exists, in the process of Web page loading, the image that exists in the CSS background image will wait until the structure loading is complete (after the content of the page is all displayed), and the HTML
A label is a part of the structure (content) of the page that is loaded during the loading of the structure. In other words, the page will load first
The contents of the tag, and then load the background image, if you use
Introduced a large picture, then before the download of this picture is complete,
The content will not be displayed later. And if you use CSS to introduce the same image, the structure of the Web page and the content is loaded, the background image will not be loaded, and it won't affect the content of your Web browsing.
2. Usually non-content of the picture is written in the CSS, if the content of the picture is written in the HTML,
For example, you want to make a photo album with a nice border. Then the frame of the picture is written in the CSS, the picture frame inside the content is written in the HTML.
Web page Design direction is the presentation layer and Content layer separation, CSS tube performance, that is, display effect, HTML tube structure, content structure division, so that the code is simple and easy to maintain some.
3. The browser reads the page, the CSS background image and the IMG image are downloaded to the local cache folder. As for how long the cache is, each cache file has a tag, and the browser will determine whether to resend the request to the server for resources. As for how this tag is, it depends on how the server is set up. As a result, CSS backgrounds and img Images can be reused in Web pages.
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.
Sina Bo Friends