文字倾斜 |
font-style:italic |
|
font-style:oblique |
强制换行 |
文字粗细 |
font-weight:bold |
加粗 |
font-weight:bolder |
比加粗还要粗 |
font-weight:lighter |
默认细线 |
font-weight:100-----900 |
文字粗细9个样式 |
font-weight:normal |
400样式 常用这种样式 |
文字大小 |
font-size: 60px |
|
文字字体 |
font-family:"宋体" |
|
文字装饰 |
text-decoration:underline |
添加下划线 |
text-decoration:overline |
添加下划线 |
text-decoration:line-through |
加删除线(穿过字体) |
文字位置 |
text-align:left |
文字居左(默认) |
text-align:center |
文字居中 |
text-align:right |
文字居右 |
文字向右 |
text-indent:3em |
文字向右缩进 em(空格) |
字间距 |
letter-spacing: px |
|
词间距 |
word-spacing: px |
|
行间距 |
line-height: px |
|
字母大小写转换 |
text-transform:uppercase |
全部换成大写 |
text-transform:lowercase |
全部换成小写 |
first-letter{test-text-transform:uppercase} |
首字母换成大写 |
背景颜色 |
font-size:11.0pt;font-weight:400;font-style:normal;text-decoration:none;text-align:center;vertical-align:middle;mso-protection:locked visible;height:57.00pt;width:162.75pt;" rowspan="4" >背景图片平铺 |
background-image:urll(路径) |
默认平铺 |
background-repeat:no-repeat |
不平铺 |
background-repeat:repeat-x |
横向平铺 |
background-repeat:repeat-y |
纵向平铺 |
背景图片移动 |
background-position: px px |
像素移动 |
background-position:top right |
右上移动 |
background-position:conter |
正中 |
|
|
左下 等等 |
|
background-attachment:fixed |
图片位置固定不会随鼠标移动 |
|
background-attachment:scroll |
图片位置随鼠标移动 |
|
background-size:cover |
图片撑满边框 |
|
background-size:contain |
图片大小与边框一致 |
|
background-size: x% y% |
图片按比例放大 |
内边距 |
padding: |
|
外边距 |
margin: px px px px: |
|