css的text和font

一,text     文本的样式

  1,颜色   color

  2,文本对齐方式  text-align=left(左)/center(居中) / right(右) / justify(两端);

  3,文本修饰    text-decoration=none(没有)/overline(上划线)/underline(下划线)/line-through(删除线);

  4,文本缩进    text-indent:(数字)px;

二,font  字体

  1,大小  font-size:(数字)px;

  2,颜色  color

  3,形状  font-style:normal(正常)/italic(斜体)/oblique(倾斜)/inherit(继承父级);

  4,字形  font-family:”字体“;

  5,加粗  font-weight:bold;(也可以加数字,后面不加px,400为正常,大于400为变粗,小于400为变细。)

原文地址:https://www.cnblogs.com/bokeyanghao/p/9628398.html