我想将应用程序中的字体更改为自定义字体,但以下代码无效:
@font-face
{
font-family: "ArnoProBold";
src: url("resources/fonts/ArnoProBold.ttf");
}
@font-face
{
font-family: "ArnoProCaption";
src: url("resources/fonts/ArnoProCaption.ttf");
}
@font-face
{
font-family: "Arn";
src: url("resources/fonts/ArnoProLightDisplay.ttf");
}
答案 0 :(得分:10)
嘿@Ritesh请尝试这样的事情,
@font-face {
font-family: 'ArnoProBold';
src: url('resources/fonts/your_file.eot');
src: url('resources/fonts/fonts?#iefix') format('embedded-opentype'),
url('resources/fonts/your_file.woff') format('woff'),
url('resources/fonts/your_file.ttf') format('truetype'),
url('resources/fonts/your_file.svg#ArnoProBold') format('svg');
font-weight: normal;
font-style: normal;
}
等等。
我希望这会有所帮助。 :)