4.四种CSS导入方式
代码部分:
-
行内样式
<h1 style="color: red;">我是标题h1>
-
内部样式
<style>
h1{
color: green;
}
style>
-
外部样式
<link rel="stylesheet" href="css/style.css">/*外部样式*/
h1{
color: yellow;
} -
导入式
<style>
@import url(css/style.css);
style>
笔记部分:
<h1 style="color: red;">我是标题h1>
<style>
h1{
color: green;
}
style>
<link rel="stylesheet" href="css/style.css">
/*外部样式*/
h1{
color: yellow;
}
<style>
@import url(css/style.css);
style>