0

名前付きgrailsを適用しようとしている Web アプリケーションに取り組んでいますが、Web アプリケーションには適用されません。私が従った手順は次のとおりです。fontopen sans

以下のコードをextended.cssファイルに入れました

@font-face {
    src: url('../../images/font/openSans.woff');
    font-family: 'open sans';
    /*url('openSans.woff') format('woff'),*/
    font-style: normal;
    font-weight: normal;
}

body{
    font-family: 'open sans';
}

私は何が欠けていますか?

4

2 に答える 2

0

任意の Web サイトからフォントをダウンロードします。webFont Generatorにたどり着きました。zip ファイルが生成されます。.css ファイルにアクセスし、コードをコピーして Web のスタイル タグ内に貼り付けます。また、すべてのファイルを同じディレクトリ内に貼り付けます。すべてのブラウザを実行します。

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

body{
font-size: 13px;
    font-family: "Philosopher";
}

このコード スニペットは、philospher フォントに当てはまります。この例に基づいて、任意のフォントを使用できます。楽しみ。

于 2013-09-27T10:59:51.807 に答える