📜  @font-face 多种字体粗细 - CSS 代码示例

📅  最后修改于: 2022-03-11 14:47:51.057000             🧑  作者: Mango

代码示例1
@font-face {
  font-family: "myFont";
  src: url("myFont-reg.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: "myFont";
  src: url("myFont-italic.ttf") format("truetype");
  font-weight: normal;
  font-style: italic;
}

@font-face {
  font-family: "myFont";
  src: url("myFont-bold.ttf") format("truetype");
  font-weight: bold;
  font-style: normal;
}