@ font-face HattoriHanzoLight不起作用

ana*_*ana 18 css fonts css3 font-face

我从这个网站下载了字体:

http://www.fontsquirrel.com/fonts/Hattori-Hanzo

这是我的代码:

<style type="text/css">
    @font-face {
    font-family: 'HattoriHanzoLight';
    src: url('hattori_hanzo.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
}
</style>
</head>
<body style='font-family: HattoriHanzoLight; font-size: 19px;'>
content
</body>
Run Code Online (Sandbox Code Playgroud)

我的html文件和我的字体文件在同一目录中.

为什么我仍然会看到默认字体?

E.G*_*.G. 19

这段代码对我有用,所以这不起作用的唯一方法是因为你要么;

  • 文件权限不正确
  • 该文件(来自存档是大写,而不是在您的代码中)
  • 您从具有不可见字符的源复制和粘贴

  • 哇.好的电话EG (2认同)