2013-08-28 28 views
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文件存儲在公共/字體/文件夾。任何想法爲什麼字體不顯示?

在此先感謝。

+0

你轉換你的字體字體或者你只是複製/將其粘貼到您的項目? (因爲我沒有看到woff,eot,svg文件) – drip

+0

複製並粘貼。我應該做一些轉換? –

+0

是的。您應該使用「http://www.fontsquirrel.com/tools/webfont-generator」並將字體轉換爲字體,以便不同的瀏覽器可以支持它。看看它應該看起來如何:http://css-tricks.com/snippets/css/using-font-face/ – drip

回答

1

感謝@cYn,我找到了答案。 我意識到,在路由文件我有

GET /public/*file controllers.Assets.at(path="/public", file)

因此,而不是資產,我把公衆和它的工作: /assets/fonts/bluepss.ttf