行内式

1
<div style="font-size:12px; text-align:center;">HTML中引用CSS的行内式方法</div>

嵌入式

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<!DOCTYPE html>

<html>
<head>
<meta name="viewport" content="width=device-width" />
<title></title>
<style type="text/css">
div {
font-size: 12px;
text-align: center;
}
</style>
</head>
<body>
<div>HTML中引用CSS的嵌入式方法</div>
</body>
</html>

链接式

1
<link href="~/Content/Base.css" rel="stylesheet" type="text/css" />

导入式

1
2
3
<style type="text/css">
@import "/Content/Base.css"
</style>

markmark