一个css 格式如上图:
h1{
color: red;
font-size: 25px;
}
引入CSS的方法有行内式、内嵌式、导入式和链接式4种
<td style="color: #FF0000; text-decoration: underline" width="88%">
下面这段代码只能放置在html文档的<head>和</head>之间(嵌入式)
<style type="text/css">
h1{ color: red; font-size: 25px; }
</style>
链接式:
<link href="style1.css" rel="stylesheet" type="text/css" />
而使用导入式,则需要使用如下语句:
<style type="text/css">
@import url("style2.css");
</style>