2014-10-26 24 views
0

我想使用VAGRoundedStd-Thin.otf作爲我的標題字體。 我已經得到了字體,並使用ftp將它放在我的網站文件夾中。試圖在網站上實現自定義字體。嘗試以下代碼沒有成功

之後,我把下面的代碼放在css文件中。

@font-face{ 
    font-family:"VAG Rounded W02 Thin"; 
    src:url("rimowaedition.com/VAGRoundedStd-Thin.otf") format("opentype"); 
} 

h2 { 
    font-family: "VAG Rounded W02 Thin" !important; 
} 

我感到沮喪,並開始把重要的代碼,但沒關係。 關於我如何使用字體的任何想法。

鏈接到網站:http://rimowaedition.com/

+0

即使您成功添加字體,它也很可能不會在其他瀏覽器/操作系統上工作,而不會分配額外的工作。使用http://www.fontsquirrel.com/tools/webfont-generator並上傳您的otf字體,並將其轉換爲其他格式以實現跨瀏覽器兼容性。 – UserDy 2014-10-26 23:46:40

+0

我認爲問題出在字體文件的位置上。 您是否在控制檯中發現任何錯誤。 – 2014-10-26 23:49:35

+0

Fontsquirrel不會爲我工作,因爲它是一種付費字體。他們只做自由字體。 – Cerebros 2014-10-27 00:06:20

回答

0

它改變了這一點。

@font-face{ 
    font-family:"VAG Rounded W02 Thin"; 
    src:url("http://rimowaedition.com/VAGRoundedStd-Thin.otf") format("opentype"); 
} 

希望這有效!

+0

嗨,只是想知道我是盲人還是他們看起來和我一樣。不想聽起來粗魯。它的所有這一切都讓我想起了我的想法。 – Cerebros 2014-10-27 00:05:53

+0

我改變了字體的位置。你剛纔有'rimowaedition.com/VAGRoundedStd-Thin.otf',但是你需要在前面加上http://,所以我把它改成了'http:// rimowaedition.com/VAGRoundedStd-Thin.otf' – theliberalsurfer 2014-10-27 00:09:42