This article gives you the content is about CSS two introduction style file of the difference between the simple introduction, there is a certain reference value, the need for a friend can refer to, I hope to help you.
CSS introduced style files have 2 kinds, are <link> tags and @import way, the following summarizes the difference between the 2!
The difference 1:<link> can reference not only the style file, but also other resources, but import can only introduce the style sheet file.
Difference 2: You can use JS to manipulate the DOM to insert <link> tags to change the style. For the @import approach, because the DOM method is document-based, you cannot use the JS operation @import to insert the style.
The CSS file introduced by the 3:<link> difference is loaded when the page loads, but the files introduced by @import wait until the page loads to load.
Difference 4: There is a slight compatibility problem with the @import (ie5+), but there is no compatibility problem with <link>.
Difference 5: @import can be used in Web pages, or in a CSS file, to introduce multiple CSS files into a CSS file, and link can only bring CSS files to the page pages. Note: When using @import in a CSS file, if there is a duplicate attribute defined, the value of the property @import introduced will be overwritten.