2014-02-24 34 views
0

這個問題一直讓我瘋狂了好幾個星期。我見過類似的問題herehere,但沒有找到答案。儘管我可以,但有時我的同事無法在他們的IE9上看到圖標字體(順便提一句,由icomoon生成)。現在它似乎已經轉換 - 同事可以看到他們,我不能。我使用本機安裝的IE8爲筆記本電腦供電,並且我們網站的舊版本顯示的圖標不會顯示在我的IE9機器上。我們網站的較新版本不會在任何一個上顯示圖標。圖標字體在不同的電腦上顯示不一樣

我已經準備好寫一個IE9樣式表,完全刪除圖標字體,因爲對於無法看到字體的用戶,IE仍然會將額外的15px左邊的填充看起來偏離。

IE8

enter image description here

IE9

enter image description here

難道是在瀏覽器本身還是什麼設置?這裏是我的CSS:

@media screen { 
    @font-face { 
     font-family: 'icons'; 
     src:url('Media/fonts/icons.eot'); 
     src:url('Media/fonts/icons.eot?#iefix') format('embedded-opentype'), 
      url('Media/fonts/icons.woff') format('woff'), 
      url('Media/fonts/icons.ttf') format('truetype'), 
      url('Media/fonts/icons.svg#icons') format('svg'); 
     font-weight: normal; 
     font-style: normal; 
    } 
    [data-icon]:before { 
     font:normal normal normal 1em/0 'icons'; speak:none; text-transform:none; 
     -webkit-font-smoothing:antialiased; -moz-osx-font-smoothing:grayscale; 
    } 
    [data-icon="search"]:before  { content:"\e601"; } 
    [data-icon="downarrow"]:before { content:"\e602"; } 
    [data-icon="forms"]:before  { content:"\e603"; } 
    [data-icon="contact"]:before { content:"\e604"; } 
} 

回答

0

我解決了我自己的問題,因爲我在打字幾周後就打出了這個問題。由於我沒有在任何地方找到這個答案,我認爲這是值得在這裏記錄。

問題在於將CSS放入@media查詢:@media screen {}。我剛剛刪除了該查詢,現在我的字體似乎正在工作。

我希望這可以幫助任何可能在這個問題上磕磕絆絆的人。雖然我仍然不確定爲什麼我的同事的安裝和我的安裝之間存在差異,所以如果任何人都可以放光,那會很棒!

相關問題