文字样式
-
字体
-
定义元素内文字以什么字体来显示
-
font-family: 字体名|字体集
-
多个字体,用逗号隔开
-
引号嵌套,外使用双引号,内使用单引号、
-
-
文字大小
-
font-size :绝对单位|相对单位
-
Px 像素
-
em/%
属性值 说明 in 英寸 cm 厘米 mm 毫米 pt point 印刷的点数 -
-
color文字颜色
- color 颜色名/十六进制/RGB
-
font-weight 文字粗细
- 为文字设置粗细
- font -weight:normal|bold|bolder|lighter
- 默认是normal
-
font-style 文字样式
- font-style:normal|italic|oblique
-
Font-variant 字体变形
-
设置元素中文本小型大写字母
-
font-variant :normal | small-caps
-
css文本样式
- text -align
- 设置元素内的文本水平对齐方式
- text-align:left|right|center|justify
- 该元素只对块级元素有效
- line-height 属性
- 设置元素中文本行高
- ling-height :长度值|百分比
- 一行文字的高度 行高指文本行基线间的距离
- vertical-align 属性
- 设置元素内容的垂直方式
- vertial-align:baseline |sub|super|top|长度|百分比