我试图为我的应用程序制作自定义字体.为此,我在我的html文件中编写了这段代码:
<style type="text/css" media="screen">
@font-face {
font-family: centurySchoolbook;
src: url(/fonts/arial.ttf);
}
body {
font-family: centurySchoolbook;
font-size:30px;
}
</style>
Run Code Online (Sandbox Code Playgroud)
在我的Html正文中:
<body onload="init();">
<h>Custom Fonts</h>
<div>This is for sample</div>
</body>
Run Code Online (Sandbox Code Playgroud)
但是,这些样式不适用于我的html体..任何帮助解决这个问题.. ??