SVG 图标字体在 Chrome 中存在渲染问题。尝试将 woff 文件与源中的 SVG 文件交换。我也写了一篇关于在 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;
}