CSS3 @font-face 规则

指定名为"myFirstFont"的字体,并指定在哪里可以找到它的URL:

@font-face
{
  font-family: myFirstFont;
  src: url('Sansation_Light.ttf'),
       url('Sansation_Light.eot'); /* IE9 */
}

以下实例为在div中使用的字体:

div
{
  font-family: myFirstFont;
}

语法

@font-face
{
  font-properties
}

字体描述说明
font-family name 必需的。定义字体的名称。
src URL 必需的。定义该字体下载的网址(S)
font-stretch normal
condensed
ultra-condensed
extra-condensed
semi-condensed
expanded
semi-expanded
extra-expanded
ultra-expanded
可选。定义该字体应该如何被拉长。默认值是"正常"
font-style normal
italic
oblique
可选。定义该字体应该是怎样样式。默认值是"正常"
font-weight normal
bold
100
200
300
400
500
600
700
800
900
可选。定义字体的粗细。默认值是"正常"
unicode-range unicode-range 可选。定义该字体支持Unicode字符的范围。默认值是"ü+0-10 FFFF"
原文地址:https://www.cnblogs.com/vickylinj/p/12029605.html