具有font-awesome的现代浏览器需要哪个文件?

时间:2013-12-23 02:55:28

标签: html css font-awesome

我的LESS / css文件中有以下内容:

@font-face {
  font-family: 'FontAwesome';
  src: url('/Content/font-awesome/fontawesome-webfont.eot?v=3.0.1');
  src: url('/Content/font-awesome/fontawesome-webfont.eot?#iefix&v=3.0.1') format('embedded-opentype'),
    url('/Content/font-awesome/fontawesome-webfont.woff?v=3.0.1') format('woff'),
    url('/Content/font-awesome/fontawesome-webfont.ttf?v=3.0.1') format('truetype');
  font-weight: normal;
  font-style: normal;
}

[class^="fa-icon-"],
[class*=" fa-icon-"] {
  font-family: FontAwesome;
  font-weight: normal;
  font-style: normal;
  text-decoration: inherit;
  -webkit-font-smoothing: antialiased;
  display: inline;
  width: auto;
  height: auto;
  line-height: normal;
  vertical-align: baseline;
  background-image: none;
  background-position: 0% 0%;
  background-repeat: repeat;
  margin-top: 0;
}

我的应用程序正常工作并正确显示图标,但我对将使用哪些文件感到困惑。我正在使用所有现代浏览器IE9,最新的Chrome,Firefox和Safari。

1 个答案:

答案 0 :(得分:2)

Please see the image below

我们以不同的格式添加字体,因为每个浏览器都有自己的呈现字体的方式,因此包含不同格式的字体。