2017-07-31 8 views
0

Microsoftアイコンの単純な@importインクルードをテストしています。 Chromeでは正常に動作しますが、IEには何も表示されず、エラーも表示されません。@import issues in IE11

link to example

スタイリング

@import "https://appsforoffice.microsoft.com/fabric/1.0/fabric.min.css"; 
.ms-Icon { 
font-size:35px; 
display:block; 
margin:10px auto; 
color:red; 
border:1px solid black} 

HTML

<div> 
<i class="ms-Icon ms-Icon--alert"></i> 
</div> 

私はリファレンスとしてだけでなくJSFiddleにCSSファイルを追加しようとした、まだこの問題を持っていました。私は、EOTFの書式設定でIE9以下にいくつかの問題があることを知っていますが、私はIE11を使用しており、解決策への参照は見つかりませんでした。それは、IE11で私のために働いている

+0

... – Hawkings

答えて

0
This is an old question, however I feel it would be best if I answered it now as I came across the same problem with IE even after all possible solutions were applied. I am assuming the website in question here was hosted on a local server, which IS the problem with IE essentially. It took me a while to realize, but I noticed that my live website had working fonts, whilst my local version didn't. By default IE usually has a setting applied to show compatibility view mode in the browser for locally hosted websites (Intranet), which means that some styling may not work correctly as intended and also imported fonts often will not work. 

I can do it more effecient because I can use IF statements in templates and CSS to avoid an extra server lookup (part of my framework). Something like this: 

In CSS: 

/* #IF !$is_msie */ 
<load font from CDN> 
/* #ENDIF */ 

In HTML: 

<!-- #IF $is_msie --> 
<load font from domain> 
<!-- #ENDIF --> 
+0

あなたは例を持っていますか?私はあなたがあなたが答えたものをどのように試すのか理解していません – Silverstaryu

+0

あなたが共有している例は私のために働いています。 IEを最新版に更新しよう –