【发布时间】:2017-02-04 17:57:02
【问题描述】:
我在网站中使用以下结构:
- 根
- 主题
index.html
- 资产
- 我的字体
- CSS
fontiran.css和style.css - 字体
IRANSansWeb.eot、IRANSansWeb.woff、IRANSansWeb.woff2和IRANSansWeb.ttf
- CSS
- 我的字体
- 主题
内容是:
index.html:
[...]
<link href="../assets/myfont/css/style.css" rel="stylesheet">
[...]
style.css:
@import url(fontiran.css);
body {
font-family: IRANSans !important;
}
fontiran.css:
@font-face {
font-family: IRANSans;
font-style: normal;
font-weight: normal;
src: url('../fonts/IRANSansWeb.eot');
src: url('../fonts/IRANSansWeb.eot?#iefix') format('embedded-opentype'),
url('../fonts/IRANSansWeb.woff2') format('woff2'),
url('../fonts/IRANSansWeb.woff') format('woff'),
url('../fonts/IRANSansWeb.ttf') format('truetype');
}
但该字体在网站上不起作用。 FontFinderfirefox 插件显示:
Font
===============================
font-family (stack): IRANSans
Font being rendered: System Default
font-size: 13px
但它没有被使用。究竟是什么问题?
【问题讨论】: