所以,我已经尝试了所有方法让@font-face在Mozilla Firefox3.6中工作。问题是,我非常确定这是因为我想在我的Tumblr博客上使用@font-face,所以我在Tumblr uploader上上传字体。
@font-face {
font-family: feel_scriptregular;
src: url(http://static.tumblr.com/3fk4soa/zKcm8o1y2/feel_script.otf);
src: url(http://static.tumblr.com/3fk4soa/IyZm8o1sa/feel_script-webfont.eot?#iefix) format(embedded-opentype),
url(http://static.tumblr.com/3fk4soa/wgFm8o1tk/feel_script-webfont.woff) format(woff),
url(http://static.tumblr.com/3fk4soa/wlLm8o1us/feel_script-webfont.ttf) format(truetype),
url(http://static.tumblr.com/3fk4soa/tofm8o1vl/feel_script-webfont.svg#feel_scriptregular) format(svg);
}使用双引号(")、单引号(')或不使用任何引号都不起作用,我不知道该怎么办。:/
发布于 2012-08-13 23:38:15
这是一个跨域的东西,你不能从你自己的子域访问static.tumblr.com。我以前已经通过在css中嵌入字体解决了这个问题。如果你转到this generator并选择了expert选项,你可以勾选框'Base64编码‘,它将在tumblr上工作,因为.woff和.tft数据是css的一部分。
发布于 2012-08-13 08:15:12
这就是跨域字体的问题:它们必须在同一个域中,或者必须有HTTP-header "Access-Control-Allow-Origin“
nginx - https://gist.github.com/1131897 & https://serverfault.com/questions/186965/how-can-i-make-nginx-support-font-face-formats-and-allow-access-control-allow-o的解决方案
所以,只需在你自己的主机上上传你的字体,并修复你的apache/nginx以服务于右标题。
https://stackoverflow.com/questions/11926800
复制相似问题