font属性
- 文字大小 font-size
- 文字加粗 font-weight
加粗:bold 700
正常:normal 400
- 文字倾斜 font-style
倾斜:italic
正常:normal
- 字体系列 font-family
书写顺序: font-size font-weight font-style font-family
text属性
- 文本缩进:text-indent
- 文本对齐方式:居中 text-align: center;
居左 text-align: left;
居右 text-align: right;
- 文本修饰 :下划线 text-decoration: underline;
取消下划线 text-decoration: none;
删除线 text-decoration: line-through;
背景属性
- 背景颜色: background-color:;
- 背景图片:background-image: url();
- 背景平铺: background-repeat:;
取值:repeat 平铺 默认值
no-repeat 不平铺
repear-x 沿着x轴平铺
repear-y 沿着y轴平铺
- 背景位置: background-position: ;
取值:水平位置
left 左
center 中
right 右
垂直方向
top 上
center 中
bottom 下
坐标系
原点(0,0) 盒子左上角
x轴 水平向右
y轴 垂直向下
居中
-
盒子居中; margin: 0 auto;
-
文本水平居中:将line-heigth属性设置与父盒子一致