Web ページの本文にフォントを設定したいので、次のコードで core.css ファイルを作成しました。
@font-face {
font-family: Bebas;
src: url('../fonts/bebas-webfont.ttf') format('truetype'),
url('../fonts/bebas-webfont.eot') format('embedded-opentype'),
url('../fonts/bebas-webfont.woff') format('woff'),
url('../fonts/bebas-webfont.svg') format('svg');
font-weight: 700;
}
body{
background: url('../images/bg_1.png')repeat center center fixed;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
font-family: 'Bebas', serif;
}
しかし、表示されないようです...試しても表示されません<font face="bebas"></font>
...別のフォントでこれを試してみましたが、うまくいきました。何が起こっているのかわかりません。フォントファイルは適切な場所にあります。
解決策: 2 つのフォントを使用していたので、2 つの別々の @font-face を使用するのを忘れていました。