次のコードは、GoogleChromeベータ版とIE7で機能します。ただし、Firefoxには問題があるようです。Firefoxがクロスドメインのインポートについてあまり友好的ではないことを知っているので、CSSファイルがどのように含まれるかという問題であると思われます。
しかし、これはすべて静的HTMLであり、クロスドメインの問題はありません。
私のlanding-page.htmlでは、次のようにCSSインポートを実行します。
<link rel="stylesheet" href="../css/main.css" type="text/css" media="screen, projection" />
main.css内に、次のような別のインポートがあります。
@import url("reset.css");
@import url("style.css");
@import url("type.css");
type.css内には、次の宣言があります。
@font-face {
font-family: "DroidSerif Regular";
src: url("font/droidserif-regular-webfont.eot");
src: local("DroidSerif Regular"),
url("font/droidserif-regular-webfont.woff") format("woff"),
url("font/droidserif-regular-webfont.ttf") format("truetype"),
url("font/droidserif-regular-webfont.svg#webfontpB9xBi8Q") format("svg");
font-weight: normal; font-style: normal; }
@font-face {
font-family: "DroidSerif Bold";
src: url("font/droidserif-bold-webfont.eot");
src: local("DroidSerif Bold"),
url("font/droidserif-bold-webfont.woff") format("woff"),
url("font/droidserif-bold-webfont.ttf") format("truetype"),
url("font/droidserif-bold-webfont.svg#webfontpB9xBi8Q") format("svg");
font-weight: normal; font-style: normal; }
body { font-family: "DroidSerif Regular", serif; }
h1 { font-weight: bold; font-family: "DroidSerif Bold", serif; }
type.cssと同じ場所に「font」というディレクトリがあります。このフォントディレクトリには、すべてのwoff / ttf/svgファイルなどが含まれています。
私はこれに困惑しています。ChromeとIEで動作しますが、Firefoxでは動作しません。これはどのように可能ですか?私は何が欠けていますか?