css关于字体设置所用到的属性名以及作用
属性名 | 作用 |
---|
color | 字体颜色 |
– | – |
font-size | 字体大小 |
– | – |
font-family | 字体类型 |
– | – |
font-style | 字体风格样式 |
– | – |
font-weight | 字体加粗 /+数字(1-900) |
– | – |
text-align | 字体水平居中 |
– | – |
font-variant | 字体大小写(不常用) |
– | – |
line-height | 行高 |
– | – |
word-spacing | 单词间距 |
– | – |
text-indent | 首行缩进 |
– | – |
text-decoration | 文本修饰 |
– | – |
letter-spacing | 字间距 |
– | – |
vertical-align | 表格垂直居中 |
text-align所用到的属性值:center: 居中 right :居右 left:居左
text-decoration所用到的属性值: overline:顶线 line-throught:删除线
underline:下划线
背景属性
属性名字以及作用 | 里面可以天的属性值 |
---|
背景色:background-color | red #ccc 关于颜色的单词代码都可以 |
– | – |
背景图:background-image | url=“图片地址” |
– | – |
背景图平铺:background-repeat | no-repeat (不平铺) repeat-x/y 垂直/水平平铺 |
– | – |
背景定位:background-position | left(左)right(右)top(顶部)bottom(底部)center(中间) |
– | – |
背景图大小:background-size | 数字+ px / % |
– | – |
背景图滚动:background-attachent | scroll(滚动) fixed(固定不滚动) |