CSS的几种导入方式按照优先级排列依次是:行入式、嵌入式、导入式和链接式
1、行入式
<body>
<h1 style = "color:white;background-color:blue">
This is a line of Text.
</h1>
</body>
2、嵌入式
<head>
<style>
h1{
color: white;
background: blue;
}
</style>
</head>
<body>
<h1>
This is a line of Text.
</h1>
</body>
3、导入式
h1{
color: white;
background: green;
}
<head>
<style>
@import url("css.css");
</style>
</head>
<body>
<h1>
This is a line of Text.
</h1>
</body>
4、链接式
h1{
color: white;
background: green;
}
<head>
<link rel="stylesheet" type="text/css" href="css.css">
</head>
<body>
<h1>
This is a line of Text.
</h1>
</body>