css:层叠样式表
内联写法:<标记 style="color:red;font-size:18px;">
多个属性用分号隔开,要带单位。
内部写法:<style type="text/css>
color:red;
font-size:18px;
</style>
外部引入方法:<link rel="stylesheet" type="test/css" href="路径">
选择器:
1 标记选择器:通过标记直接写入html或外部文件中。
2 类选择器:通过class 前面加.
3 id选择器:通过id 前面#
4分组选择器:格式:h,p,a{}
5派生选择器:div p a{}
6属性选择器:通过标签的属性来加样式(用的很少)
7文字样式:font-size:文字大小
color:文字颜色
font-family:字体
font-weight:加粗 bold normal
font-style:斜体 italic normal
font-style:oblique:文本倾斜
8文本样式:text-align:对齐方式 left center right
text-decoration :underline overline line-through none
line-height:行高
text-indent 首行缩进
letter-spacing:字间距离
9 背景
background-color:背景颜色
background-image:背景图
background-pereat;图片是否重复
background-position:背景定位