当前位置: 代码迷 >> 综合 >> CSS中font样式
  详细解决方案

CSS中font样式

热度:16   发布时间:2024-01-28 04:29:36.0

font 用于在一个声明中设置所有的字体样式属性

    1、必须至少有字体和大小

    2、不能和line-height共生,字体大写/line-height

    3、样式属性按照下面顺序排列

font-style:设定字体的风格

font-weight:设置字体的粗细

font-size:设置字体大小

font-family:设置字体系列,使用逗号分割每种字体

p{border: 1px solid red;font-style: inherit;font-weight: bold;font-size: 24px;font-family: 方正清刻本悦宋简体;
}
p{border: 1px solid red;height: 120px;text-align: center;font: italic bolder 24px/120px 方正清刻本悦宋简体;
}

 

  相关解决方案