【问题标题】:Bootstrap - about fonts files (.eot .svg .ttf .woff and .woff2) roles and usagesBootstrap - 关于字体文件(.eot .svg .ttf .woff 和 .woff2)的角色和用法
【发布时间】:2016-01-13 00:34:03
【问题描述】:

在 Bootstrap 3 的字体文件夹中,我们可以看到这些文件:

  • glyphicons-halflings-regular.eot
  • glyphicons-halflings-regular.svg
  • glyphicons-halflings-regular.ttf
  • glyphicons-halflings-regular.woff
  • glyphicons-halflings-regular.woff2

它们是否都是以不同格式转换的相同文件?它们都是必需的吗?每个文件的作用/用途是什么?

【问题讨论】:

    标签: css twitter-bootstrap fonts twitter-bootstrap-3 font-face


    【解决方案1】:

    之所以包含它们,是因为每种字体都是为了解决不同的问题而创建的。 Woff 和 woff2 是旨在阻止字体盗版的最新格式。 Svg 也是一种较新的格式,它是一种矢量文件,用于 iOS 移动设备。 Tff 和 eot 是旧浏览器使用的旧学校格式,但它们允许任何人免费下载和使用该字体。

    简短回答:它们都包含在内以实现多版本跨浏览器兼容性。

    见:Why should we include ttf, eot, woff, svg,... in a font-face

    【讨论】:

      猜你喜欢
      • 2017-06-05
      • 2014-10-26
      • 2016-06-27
      • 2021-02-27
      • 2021-08-02
      • 1970-01-01
      • 1970-01-01
      • 2012-06-15
      相关资源
      最近更新 更多