這個問題一直讓我瘋狂了好幾個星期。我見過類似的問題here和here,但沒有找到答案。儘管我可以,但有時我的同事無法在他們的IE9上看到圖標字體(順便提一句,由icomoon生成)。現在它似乎已經轉換 - 同事可以看到他們,我不能。我使用本機安裝的IE8爲筆記本電腦供電,並且我們網站的舊版本顯示的圖標不會顯示在我的IE9機器上。我們網站的較新版本不會在任何一個上顯示圖標。圖標字體在不同的電腦上顯示不一樣
我已經準備好寫一個IE9樣式表,完全刪除圖標字體,因爲對於無法看到字體的用戶,IE仍然會將額外的15px左邊的填充看起來偏離。
IE8
IE9
難道是在瀏覽器本身還是什麼設置?這裏是我的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"; }
}