选择器
标签选择器
类选择器
ID选择器
通配符选择器
字体属性
a1 {
font-family: 微软雅黑;
font-size: 30px;
/* 700表示加粗,400是正常字体,后面不用加px */
font-weight: 700;
/* 这个表示斜体 */
font-style: italic;
}
a2 {
/* font: font-style font-weight font-size/line-height font-family */
/* 最后两个属性一定要出现 */
font: italic 700 30px 微软雅黑;
}
文本属性
p {
color: blue;
text-align: center;
text-decoration: none;
text-indent: 2em;
line-height: 26px;
}
CSS的引入方式
行内样式表
内部样式表
外部样式表
<link rel="stylesheet" href="css文件路径">