Home  >  Q&A  >  body text

javascript - 引入的@font-face的时候,为什么src属性值中要加入local方法?

@font-face {
font-family: 'Quattrocento';
font-style: normal;
font-weight: 400;
src: local('Quattrocento'), url(http://fonts.gstatic.com/s/qu... format('truetype');
}
@font-face {
font-family: 'Quattrocento';
font-style: normal;
font-weight: 700;
src: local('Quattrocento Bold'), local('Quattrocento-Bold'), url(http://fonts.gstatic.com/s/qu... format('truetype');
}

大家讲道理大家讲道理2652 days ago282

reply all(2)I'll reply

  • ringa_lee

    ringa_lee2017-04-11 12:46:14

    如果某些字无法定义成指定字体样式,那么这段文字就用本地的指定字体所代替

    恩,我也是翻的

    reply
    0
  • 黄舟

    黄舟2017-04-11 12:46:14

    感觉你第二个写法怪怪的,不应该是 font-style:bold吗?

    reply
    0
  • Cancelreply