Methods to reference css files: 1. Use the link tag, the syntax ""; 2. Use " @import" rule, syntax "@import url(file path);".
The operating environment of this tutorial: Windows 7 system, CSS3 version, Dell G3 computer.
1. Use the link tag (link style)
Write the css code in a separate file, and use the link tag to directly introduce the file to the page middle. A page can use the LINK tag multiple times to introduce multiple external CSS files. Pay attention to the mutual influence of these CSS codes. Usually, the CSS files introduced later will overwrite the same effects of the CSS files introduced earlier. This method of introducing CSS is currently the most popular. CSS codes can be planned within the scope of each website to facilitate reuse and maintenance. However, this highly centralizes the code, and the amount of code may be too large, and it is easy to cause problems if it is not properly maintained. confusion.
<link rel="stylesheet" type="text/css" href="style.css">
2. Use @import (import)
There are two ways to use @import to introduce CSS files, one can be placed in the page