gpt4 book ai didi

css - @font-face HattoriHanzoLight 不起作用

转载 作者:技术小花猫 更新时间:2023-10-29 10:16:27 24 4
gpt4 key购买 nike

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

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>

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

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

最佳答案

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

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

关于css - @font-face HattoriHanzoLight 不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8260103/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com