我在为这个网站加载@font-face时遇到了最大的困难。有人知道这是怎么回事吗?
我尝试使用字体松鼠的css,但也不起作用,所以我尝试了一个更简单的代码,希望它能工作,但到目前为止没有运气。
较旧的CSS (不起作用)
@font-face {
font-family: 'CartoGothicStdBold';
src: url('CartoGothicStd-Bold-webfont.eot');
src: local('☺'), url('CartoGothicStd-Bold-webfont.woff') format('woff'), url('CartoGothicStd-Bold-webfont.ttf') format('truetype'), url('CartoGothicStd-Bold-webfont.svg#webfontuvgRkG9V') format('svg');
font-weight: normal;
font-style: normal;
}较新的CSS (仍然不起作用)
@font-face {
font-family: 'CartoGothicStdBold';
src: url(css/fonts/CartoGothicStd-Bold.otf) format("opentype");
}
.b-nb {
float: left;
width: 100%;
font-size: 1.25em;
color: grey;
font-family:'CartoGothicStdBold', serif;
}我在这里测试它:http://drewlepp.com/testing/laa/LAA%20studio/index.html
谢谢!
发布于 2011-07-04 09:27:19
老问题,但无论如何我都会给你指出正确的答案(以防其他人偶然发现这个问题)
老式的CSS在我看来没问题。但是如果你使用的是IE9和私有字体,你会在IE9的控制台上看到一个错误。所以你需要做这个家伙在这里做过的事情:@font-face works in IE8 but not IE9
https://stackoverflow.com/questions/4328586
复制相似问题