【发布时间】:2015-09-03 17:27:16
【问题描述】:
我正在尝试使用 font-face 和我计算机上的本地字体的自定义字体。
我将 XAMPP 用于本地服务器,将 Dreamweaver 用作 IDE(不确定这是否重要,尽管我在那里“管理”了我的字体并添加了我正在尝试使用的字体)。
无论如何,当我尝试查看我的测试时,我不断从浏览器控制台收到以下“错误”:我正在尝试这个东西的 h1 元素上的字体系列的“未知属性名称”。
这是我写的一些代码,也许我有什么问题?
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Prueba: Importando Fuentes</title>
<style type="text/css">
@font-face
{
font-family: 'origami';
src:url("http://localhost/Laboratorio%20de%20Pruebas/Mayo/Fonts/fonts/fonts/origami_making.ttf");
font-weight:normal;
}
h1
{
font-familiy: 'origami', sans-serif;
}
h2
{
font-family: Impact, Haettenschweiler, "Franklin Gothic Bold", "Arial Black", sans-serif;
}
</style>
</head>
<body>
<h1>ORIGAMI</h1>
<h2>IMPACT</h2>
</body>
</html>
【问题讨论】: