这里是一个示例

1
2
3
4
5
6
<style>
body {background-color: yellow;}
h1 {font-size: 36pt;}
h2 {color: blue;}
p {margin-left: 50px;}
</style>

我们再来写一下,在每个大括号中,也就是对应其左边名称的性质,比如p就是普通行的性质,h1就是大标题的性质,h2就是次标题的性质。

我们还可以针对p写很多条性质,不仅仅是颜色,还有其他,例如

1
2
3
4
5
6
p
{
color: red;
text-align:center;
font-family:arial;
}