SVG圖標字體在Chrome中存在渲染問題。嘗試使用源代碼中的SVG文件交換woff文件。我寫了一篇關於preventing icon font cutoff in Chrome的博客文章,您可以查看。
即改變這一點:
@font-face {
font-family: 'icomoon';
src:url('fonts/icomoon.eot');
src:url('fonts/icomoon.eot?#iefix') format('embedded-opentype'),
url('fonts/icomoon.woff') format('woff'),
url('fonts/icomoon.svg#icomoon') format('svg'),
url('fonts/icomoon.ttf') format('truetype');
font-weight: normal;
font-style: normal;
}
這樣:
@font-face {
font-family: 'icomoon';
src:url('fonts/icomoon.eot');
src:url('fonts/icomoon.eot?#iefix') format('embedded-opentype'),
/*
The SVG font has rendering problems in Chrome on Windows.
To fix this, I have moved the SVG font above the woff font
so that the woff file gets downloaded.
*/
url('fonts/icomoon.svg#icomoon') format('svg'),
url('fonts/icomoon.woff') format('woff'),
url('fonts/icomoon.ttf') format('truetype');
font-weight: normal;
font-style: normal;
}
已經很長一段時間了,但我剛剛有同樣的問題。似乎是一個[常見問題](https://github.com/FortAwesome/Font-Awesome/issues/353) – yuvi
我也是。它的一些圖標並不明顯,但其他的,如'icon-print'以'.btn-small'(11.9px)截斷。 – Voodoo
我發現該圖標在11.5px和11.99px之間的字體大小被截斷。在11.49px px這很好。不確定這是否是一個棘手的問題或有點。 – Ravimallya