css 文本外观属性(text) 和 字体样式属性(font)

css文本 text外观属性

color:   颜色值(red,blue)十六进制 ,rgb

letter-spacing:   字间距 px,em

word-spacing:  单词间距 对中文无效

line-height:   行间距 px,em , %

text-transform:   文本转换 none:不转换 capitalize:首字母大写 uppercase: 全部字符转换为大写 lowercase: 全部字符转换为小写

text-decoration:  文本装饰 none:默认值 underline:下划线 overline:上画线 line-through:删除线 可以赋值多个

text-align:     水平对齐方式 left center right

text-indent:   首行缩进 数值 em %

white-space:   空白符处理 normal:常规默认 pre: 预格式化,按文档书写格式保留空格 nowrap:空格空行无效 强制文本不能换行,除非遇到换行标记<br/>

css字体样式属性(font)

1,font-size: 字体大小 em,px,rem,

2, font-family:  Arial,"微软雅黑","宋体"; 各种字体间用英文逗号隔开,英文字体位于中文字体之前,英文字体一般不需要加引号。

3,font-weight:  normal,bold,bolder,lighter,100-900 字体粗细

4,font-style:  normal,italic,oblique 字体风格

5, 选择器{font:font-style font-variant font-weight font-size/line-height font-family} 综合设置字体样式

原文地址:https://www.cnblogs.com/jeff-zhu/p/11384070.html