css 字体样式

205 阅读1分钟

字体样式

  1. font-size:字体大小,单位px em
  2. 谷歌默认字体16px
  3. 注意:尽量使用偶数, >14px
  4. font-family:设置字体,系统默认字体---微软雅黑 宋体
  5. 属性值:中文带引号 单个英文单词不带引号 带有空格、#、$符号要加引号
  6. 多个值逗号隔开
  7. font-weight:字体粗细 属性值可以是英文也可以是数字
  • normal 400
  • bold 700
  1. font-stylt:字体风格
  • font:font-style font-weight font-size font-family
  • 有顺序,不能颠倒,font-size font-family不能省略