2
工作在我的CSS,我有:@字體面不玩的框架
@font-face
{
font-family: 'myFont';
src: url("fonts/bluepss.ttf");
font-weight: normal;
font-style: normal;
}
button {
font-family: myFont;
font-size: 40px;
color: #FFFFFF;
width: 400px;
height: 100px;
background-color: #BDAEC6;
}
的bluepss.ttf文件存儲在公共/字體/文件夾。任何想法爲什麼字體不顯示?
在此先感謝。
你轉換你的字體字體或者你只是複製/將其粘貼到您的項目? (因爲我沒有看到woff,eot,svg文件) – drip
複製並粘貼。我應該做一些轉換? –
是的。您應該使用「http://www.fontsquirrel.com/tools/webfont-generator」並將字體轉換爲字體,以便不同的瀏覽器可以支持它。看看它應該看起來如何:http://css-tricks.com/snippets/css/using-font-face/ – drip