我通过这样做将字体加载到我的 CSS 中:
@font-face{
font-family: arialNarrow;
src: url(../fonts/ArialNarrow.ttf);
font-weight:normal;
font-style:normal;
}
@font-face{
font-family: arialNarrow;
src: url(../fonts/ArialNarrowBold.ttf);
font-weight:bold;
font-style:normal;
}
@font-face{
font-family: arialNarrow;
src: url(../fonts/ArialNarrowItalic.ttf);
font-style:italic;
font-weight:normal;
}
@font-face{
font-family: arialNarrow;
src: url(../fonts/ArialNarrowBoldItalic.ttf);
font-weight:bold;
font-style:italic;
}
正常样式适用于所有浏览器。
粗体和斜体样式仅在 IE9 中正常工作,但在 Chrome 和 FireFox 中不能正常工作。难道我做错了什么?