First, I bought a ring today. I hope this friend will be able to let me know in the future, and it will become what I want in the future. Otherwise, I will feel meaningless.
Body:
The larger the site, the more complex it is, and the richer the image, the more difficult it is to manage CSS.
We can place styles between style labels to add styles directly to the Document Header, but this is not a good way to apply styles to documents. If you want to create another page with the same style, you have to copy CSS on the new page.
There are two ways to attach external style sheets to a webpage: you can link them or import them.
<Link href = "" rel = "stylesheet" type = "text/CSS"/>
<Style type = "text/CSS">
<! --
@ Import URL ("");
-->
</Style>
In addition to importing HTML documents, you can also import a style sheet from another style sheet. Therefore, you can link the basic style sheet from the HTML page and then import the complex style sheet:
@ Import URL (/CSS/layout.css );
@ Import URL (/CSS/***. CSS );
Splitting CSS into multiple style sheets is a common method. However, the browser Benchmark Test recently showed that importing a style sheet is slower than importing a style sheet.
When using multiple CSS files, there are two other speed-related issues. First, multiple files will cause the server to send more data packets, and the number (rather than content) of these data packets will affect the download time. In addition, the browser can only download a limited number of files from a single domain at the same time. For older browsers, this restriction is only two files long. modern browsers have mentioned this restriction to eight files. Therefore, if there are three style sheets, you must wait for the first two files in the old-fashioned browser to download the third one. For these reasons, using a single well-structured CSS file can significantly increase the download speed.