2017-07-09 12 views
0

私のレールアプリでSegoePrintフォントを使用しようとしています。私はfirefoxとIEの両方でRailsカスタムフォントが動作しない

@font-face { 
font-family: "SegoePrint";   
src: url(SegoePrint.ttf) format("truetype"); 
} 

を持っていることは、Firefoxでのみ動作するかどうSegoePrint.eot

アプリ/資産/フォントファイルの両方

SegoePrint.ttf

に私のスタイルシートで

を持っていますIEではなく、私が持っている場合は

@font-face { 
font-family: "SegoePrint";   
src: url(SegoePrint.ttf) format("truetype"); 
src: url(SegoePrint.eot); 
src: url(SegoePrint.eot?#iefix) format("embedded-opentype"); 
} 

私はIEでのみ動作し、Firefoxでは動作しません。両方のブラウザで正しく動作するようにするには正しい構文は何ですか?ありがとう。

答えて

0

どのようにあなたが

@font-face { 
    font-family: 'SegoePrint'; 
    src: asset-url('SegoePrint.eot'); 
    src: asset-url('SegoePrint.eot') format('embedded-opentype'), 
     asset-url('SegoePrint.ttf') format('truetype'); 
    font-weight: normal; 
    font-style: normal; 
} 
の下に、この構文を使用している場合について
関連する問題