2011-08-24 17 views
2

Fontsquirrel.comのSansumi @fontfaceキットを使用しています。 IE6とIE8ではIETesterプログラムで正しく動作しますが、IE7では正しく動作しません。IE7(IETEster)の@fontfaceが正しく動作しない

私のCSSコードは次のようになります。

@font-face { 
font-family: 'SansumiExtraBoldRegular'; 
src: url('../fonts/Sansumi-ExtraBold-webfont.eot'); 
src: url('../fonts/Sansumi-ExtraBold-webfont.eot?#iefix') format('embedded-opentype'), 
    url('../fonts/Sansumi-ExtraBold-webfont.woff') format('woff'), 
    url('../fonts/Sansumi-ExtraBold-webfont.ttf') format('truetype'), 
    url('../fonts/Sansumi-ExtraBold-webfont.svg#SansumiExtraBoldRegular') format('svg'); 
font-weight: normal; 
font-style: normal; 

} 

#block-system-main-menu {border-bottom: 1px solid #cecbcd;} 
#navigation ul.menu { 
list-style-type:none; 
list-style:none; 
/*overflow:hidden;*/ 
/*width:980px;*/ 
width:795px; 
height:32px; 
margin-top:0px; 
margin-bottom:0px; 
padding-left:0px; 
margin-left:auto; 
margin-right:auto; 

} 

#navigation li { 
list-style:none; 
list-style-type:none; 
padding:0; 
float:left; 
display:inline; 
height:32px; 
} 

/* style list as navigation using float:left */ 


/* set distance from left corner to the first li item */ 
#navigation ul.menu li:first-child { 
/*margin-left:75px;*/ 
} 

#navigation ul.menu li ul li:first-child { 
margin-left:0px; 
} 

#navigation ul.menu li ul { 
display:none; position:absolute; top:32px; margin:0px; padding:0; float:left; border:none; height:32px; max-height:32px; width: auto; 
} 

#navigation ul.menu li:hover ul {/*display:block;*/} 

#navigation ul.menu li:hover ul li {height:32; padding-top:0px; position: relative; display:inline; background-image:none; float:left; } 

#navigation ul.menu li a { 
/*background-color:#ffffff; */ 
font: 9pt/24pt 'SansumiRegular', Arial, sans-serif; 
letter-spacing:1px; 
text-decoration:none; 
color: #666666; 
height: 32px; 
background-image:none; 
font-weight:normal; 
display:block; 
padding-left:22px; 
padding-right:22px; 
margin-right:5px; 
margin-left:5px; 
float: left; 
} 

#navigation ul.menu li ul li a { 
/*background-color:#ffffff; */ 
font: 9pt/24pt 'SansumiRegular', Arial, sans-serif; 
text-decoration:none; 
color: #666666; 
height: 32px; 
background-image:none; 
font-weight:normal; 
display:block; 
float: left; 
} 

#navigation ul.menu li ul li a:hover, #navigation ul.menu li ul li.active-trail a.active-trail { 
/*background-color:#ffffff; */ 
font: 9pt/24pt 'SansumiRegular', Arial, sans-serif; 
text-decoration:underline; 
color: #666666; 
height: 32px; 
font-weight:normal; 
background-image:none; 
display:block; 
float: left; 
} 

#navigation ul.menu li a:hover { 
font: 9pt/24pt 'SansumiRegular', Arial, sans-serif; 
text-decoration:none; 
color: #ffffff; 
height: 32px; 
background-image:url('../images/navi_active.png'); 
font-weight:normal; 
background-position:center; 
background-repeat:no-repeat; 

} 

#navigation ul.menu li a.active, #navigation ul.menu li.active-trail a.active-trail { 
font: 9pt/24pt 'SansumiRegular', Arial, sans-serif; 
text-decoration:none; 
color: #ffffff; 
font-weight:normal; 
height: 32px; 
background-image:url('../images/navi_active.png'); 
background-position:center; 
background-repeat:no-repeat; 

} 

div.region-header ul.menu { 
display:none; 
} 

答えて

0

IETesterは、多くの場所で失敗しません。私はIETester上のIE7が一般的に不安定で、私にとってもクラッシュすることに気付きました。 IE collectionをお試しください。問題が解決しない場合は、IE7を実行しているVMをインストールしてから、コードに問題があると想定する前にテストしてください。

UPDATE あなたが順序を変更してみてください:

@font-face { 
/* for IE */ 
font-family: 'SansumiExtraBoldRegular'; 
src: url('../fonts/Sansumi-ExtraBold-webfont.eot'); 
} 

@font-face { 
/* for other browsers */ 
font-family: 'SansumiExtraBoldRegular'; 
    src: url('../fonts/Sansumi-ExtraBold-webfont.eot?#iefix') format('embedded-opentype'), 
     url('../fonts/Sansumi-ExtraBold-webfont.woff') format('woff'), 
     url('../fonts/Sansumi-ExtraBold-webfont.ttf') format('truetype'), 
     url('../fonts/Sansumi-ExtraBold-webfont.svg#SansumiExtraBoldRegular') format('svg'); 
} 
+0

私はその後、セットアップにXPを実行しているVMを試してみて、その上でIEコレクションをインストールしますつまりコレクション –

+0

をインストールしようとすると、IE7はインストール時にグレーアウトされています。個人的に私は私のIEテストのほとんどのためにXPのVMを使用します。 – Ali

+0

私はie9(ie7モードで)のネットワークタブを調べたところ、eotファイルはロードされていませんでしたが、ie8とie9にあります。 –

0

これは少し遅くなりますが、まだこの問題に実行している人のためかもしれない - 私のような日曜日の朝にまだ私の髪をリッピングレガシーブラウザで - 私はIE6とIE7でIETesterで次のことをテストしました。実際、あなたが持っていたものに本当に近いです。

@font-face 
{ 
    font-family: "example-font-family"; 
    src: url("./fonts-location/Font.eot"); 
    src: url("./fonts-location/Font.eot?iefix") format("eot"), 
     url("./fonts-location/Font.ttf") format("truetype"); 
} 

Firefoxでもうまくいきます!これが誰かを助けることを願って!

1

IEtesterから離れる。これはレンダリングやスクリプトエンジンの正確なシミュレーションではありません。

0

@font-faceウェブフォントは、現在のバージョンのIETester(example)のIE6/7/8で動作します。

問題は、IE6/7月8日.eotパーサはバグがあるとフォントがいくつかspecial rules続かなければ動作しないということです。

たとえば、の名前は、ファミリー名で始まるか、またはそれに等しくなければなりません。 Fontforgeを使用してフォントを編集し、ttf2eotから.eotを再生成するか、無料のwebfont generatorを使用してください。

eot-good

は、その後、あなたがCSSでfont-family確認する必要があります正確に.eotにフォントファミリ名と一致します。

関連する問題