我真的需要@font-face
代碼的幫助。它似乎並不看我的字體文件。@ font-face即使在嘗試了所有我能想到的東西之後仍然無法正常工作
我試圖改變任何東西我能想到的路徑,取得了新的文件夾,重命名現有的,把字體文件在我的根等
我在Firefox和Chrome測試。
下面是我想在我的CSS代碼:
src: url(http://thefalljourneyindia.iblogger.org/wp-content/themes/thefalltheme/images/Univers.ttf);
src: url(thefalljourneyindia.iblogger.org/wp-content/themes/thefalltheme/images/Univers.ttf);
src: url(http://www.thefalljourneyindia.iblogger.org/wp-content/themes/thefalltheme/images/Univers.ttf);
src: url(www.thefalljourneyindia.iblogger.org/wp-content/themes/thefalltheme/images/Univers.ttf);
src: url(/wp-content/themes/thefalltheme/images/Univers.ttf);
src: url(../wp-content/themes/thefalltheme/images/Univers.ttf);
src: url(wp-content/themes/thefalltheme/images/Univers.ttf);
src: url(/thefalltheme/images/Univers.ttf);
src: url(../thefalltheme/images/Univers.ttf);
src: url(thefalltheme/images/Univers.ttf);
src: url(/images/Univers.ttf);
src: url(../images/Univers.ttf);
src: url(images/Univers.ttf);
src: url(www.thefalljourneyindia.iblogger.org/Univers.ttf);
src: url(/Univers.ttf);
src: url(Univers.ttf);
src: url(../Univers.ttf);
你能找出我應該把字體文件或在我的CSS來得到它的工作有什麼改變?
(我也檢查了類似的問題在這裏和其他地方在網絡上,並使用this網站無濟於事嘗試。)
謝謝!
更新: bozdoz的建議不起作用。 我用FontSquirrel來獲取字體。 這是CSS:
@font-face { font-family: 'lane'; src: url('http://thefalljourneyindia.iblogger.org/wp-content/themes/thefalltheme/images/univers-webfont.eot'); src: url('thttp://thefalljourneyindia.iblogger.org/wp-content/themes/thefalltheme/images/univers-webfont.eot?#iefix') format('embedded-opentype'), url('http://thefalljourneyindia.iblogger.org/wp-content/themes/thefalltheme/images/univers-webfont.woff') format('woff'), url('http://thefalljourneyindia.iblogger.org/wp-content/themes/thefalltheme/images/univers-webfont.ttf') format('truetype'), url('http://thefalljourneyindia.iblogger.org/wp-content/themes/thefalltheme/images/univers-webfont.svg#LaneHumouresqueRegular') format('svg'); font-weight: normal; font-style: normal; }
h1{ font-size: 110px; font-family: 'lane', georgia, serif; color: #000000; }
我使用的名稱 '道' 只是因爲bozdoz了它。
所有的字體在這裏:
http://thefalljourneyindia.iblogger.org/wp-content/themes/thefalltheme/images/
,這些都是他們的名字:
univers-webfont.eot, univers-webfont.woof, univers-webfont.ttf, univers-webfont.svg
你是否嘗試過使用像url這樣的引號(「Univers.ttf」);'? –
還有你指定'font-family:「MyFontName」;'爲你的自定義字體嗎? –
你也可以發佈整個font-face樣式和html/css代碼,在其中使用它來查看問題是否在其他地方? –