我试图使用@font-face
,但我并不是非常成功。 到现在为止,我一直在使用谷歌的字体:无法获得字体工作
// HTML header
<link href='http://fonts.googleapis.com/css?family=Cuprum' rel='stylesheet' type='text/css'>
//CSS
#leftSection nav {
font-family: "Cuprum", Verdana, Arial, sans-serif;
}
然后我下载的字体和使用font-face
尝试:
这是我的CSS:
@font-face {
font-family: 'Cuprum';
font-weight: normal;
font-style: normal;
font-size: 0.5em;
src: url('cuprum.eot?') format('eot'),
url('cuprum.woff') format('woff'),
url('cuprum.ttf') format('truetype'),
url('cuprum.svg#Cuprum') format('svg');
}
#leftSection nav {
font-family: "Cuprum", Verdana, Arial, sans-serif;
}
的字体位于与CSS相同的文件夹中。
我已经看过,并测试过其他解决方案,但我仍然无法获得它。
我与以下浏览器测试:FF7,IE8
更新
我添加font-size: 0.5em;
这至少应该更改字体大小。但那也没有发生。所以我猜想整个@font-face
被忽略。
你的头文件中有链接到你的CSS文件吗?您在那里的链接仅限于Google Font API。 – chris5marsh
是的,CSS文件加载正常。 – Steven