首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何在本地服务器(xampp)上使用字体面板?

如何在本地服务器(xampp)上使用字体面板?
EN

Stack Overflow用户
提问于 2015-06-18 07:34:13
回答 1查看 3.9K关注 0票数 0

我正在尝试使用字体脸的自定义字体和我电脑上的本地字体。

我使用XAMPP作为本地服务器和Dreamweaver作为IDE (不确定这很重要,尽管我在那里“管理”了我的字体,并添加了我试图使用的字体)。

无论如何,当我试图查看我的测试时,我总是从浏览器控制台获得以下“错误”:“”,用于我正在试用的h1元素上的字体系列。

这是我做过的一些代码,也许我做错了什么?

代码语言:javascript
复制
<!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>
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2015-06-18 07:40:50

我很确定您也需要origami_making.eot,并使用相对urls。示例

代码语言:javascript
复制
@font-face {
 font-family: "Flaticon";
 src: url("flaticon.eot");
 src: url("flaticon.eot#iefix") format("embedded-opentype"),
 url("flaticon.woff") format("woff"),
 url("flaticon.ttf") format("truetype"),
 url("flaticon.svg") format("svg");
 font-weight: normal;
 font-style: normal;
}
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/30909182

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档