0

この @font-face CSS を使用します。Chrome、Safari、IE で動作しますが、Firefox では動作しません。必要なすべてのファイルがサーバーにアップロードされます。

CSS:

@font-face {
        font-family: 'Calgary';
      src: url('../fonts/calgary.eot');
      src: url('../fonts/calgary.eot?#iefix') format('embedded-opentype'),
                 url('../fonts/calgary.woff') format('woff'),
                 url('../fonts/calgary.ttf') format('truetype');
      font-weight: normal;
      font-style: normal;
}

#header-text-webform {
  position: relative;
  top: 59px;
  left: 20px;
  font-family: 'Calgary', 'Helvetica', 'Arial', sans-serif !important;
  color: white;
  font-size: 26px;
  font-weight: normal;
  text-transform: uppercase;
  z-index: 1;
}
4

2 に答える 2

1

src 宣言が重複しています。次の行を削除します。

src: url('../fonts/calgary.eot');

そして、それがまったく役立つかどうかを確認してください。Firefox がこの最初の定義のみを読み取る場合、srcサポートされていない EOT フォントを読み込もうとします...

于 2012-05-17T16:07:18.913 に答える
0

私は常に次の構造を使用しており、Firefox(またはその他)で問題はありません

@font-face {
    font-family: 'Calgary';
    src: url('/fonts/calgary.eot');
    src: url('/fonts/calgary.eot?#iefix') format('embedded-opentype'),
         url('/fonts/calgary.woff') format('woff'),
         url('/fonts/calgary.ttf') format('truetype'),
         url('/fonts/calgary.svg#calgary') format('svg');
    font-weight: normal;
    font-style: normal;
}
于 2012-05-17T16:25:43.860 に答える