Here link and @import introduce the syntax words that HTML introduces into CSS. Both are the words that introduce CSS to HTML.
1. LINK syntax structure
<link rel= "stylesheet" type= "Text/css" href= "Cssurl path"/>
Practical application:
2. @import Grammatical structure
@import + space + URL (CSS file path address);
1), in HTML
<style type= "Text/css" >
@import url (CSS file path address);
</style>
2), in CSS
Direct use
@import url (CSS file path address);
Two, link and @import difference and choice
Home link and import syntax structure, the former <link> is HTML tags, can only be used in HTML source code, the latter can be seen as a CSS style, the role is to introduce CSS style features.
Import requires <style type= "Text/css" > tags when using HTML. You can also put in CSS files or CSS code to introduce other CSS files.
In essence, there is little difference between the use of choice, but for the software to edit the layout of the HTML code, generally use link, also recommended to use link.
CSS link and @import difference usage