p{
font-size:18px /*文本尺寸*/
font-family:"隶书" /*文本字体*/
font-weight:bold /*文本加粗 bold 加粗 bolder 更粗*/
color:red /*文本颜色*/
text-align:center /*文本水平居中 center 居中 justify 两端对齐 left 左对齐 right 右对齐*/
background-color:#ccc/*背景颜色*/
background-image:url(img/*.jpg) /*背景图片可以简写 直接加颜色 就是添加背景颜色 图片也一样*/
font-style:italic /*文本倾斜 oblique也可以 但最好用italic*/
letter-spacing:2px /*字符间距*/
line-height:20px/*行高*/
text-indent:2em /*首行缩进*/
word-spacing:2px /*单词间距*/
line-height:2px/*垂直居中*/
text-decoration:underline/*字符装饰线 underline 下划线 line-through 删除线 overline 上画线 更多用于超链接样式*/}
1、文本缩进:text-indent2、文本对齐:text-align
3、字间隔:word-spacing
4、字母间隔:letter-spacing
5、字母转换:text-transform
6、文本装饰:text-decoration
7、处理空白符:white-space
8、文本方向:decoration
9、文本颜色:color
10、背景颜色:background-color
11、文本阴影:text-shadow
还有一些属性,不是很常用,就没有列举了,了解每个具体的使用方法,可以到百度 "w3cschool "了解!
希望对你有所帮助。
color设置文本颜色direction设置文本方向。
line-height设置行高。
letter-spacing设置字符间距。
text-align对齐元素中的文本。
text-decoration向文本添加修饰。
text-indent缩进元素中文本的首行。
text-shadow设置文本阴影。CSS2 包含该属性,但是 CSS2.1 没有保留该属性。
text-transform控制元素中的字母。
unicode-bidi设置文本方向。
white-space设置元素中空白的处理方式。
word-spacing设置字间距。