【发布时间】:2014-10-08 07:49:07
【问题描述】:
我想在我的 wordpress 博客上使用我从 webtype.com 支付的字体。我不拥有该博客,因此无法将主 php 文件中的任何内容更改为 function.php。因此,我找到的唯一解决方案是在 css 自定义文件中添加此内容:
@font-face {
font-family: "Scout Normal";
src: url("http://the/url/of/the/file") format("woff");
font-style: normal;
font-weight: normal;
}
.block p {
font-family: "Scout Normal";
}
问题是每次我保存文件时,Wordpress 都会在加载字体时删除 url,这意味着
src: url("http://the/url/of/the/file") format("woff");
成为
src: format("woff");
您有什么想法来强制加载字体,或者有其他想法来加载它吗? 感谢您的帮助。
【问题讨论】:
-
你不能按原样提供css而不使用php吗?
-
@DanielA.White 我没用过php,不懂?
-
我们需要更多的上下文。你怎么把它包括在内?
-
来自wordpress的自定义页面。这是您可以购买的功能,可让您添加一些 CSS 规则。这是一个screenshot,它可以帮助你。所以你可以看到我是如何添加 css 的。
-
那么这属于 wordpress.stackexchange.com