【问题标题】:Code Igniter .otf custom fontsCode Igniter .otf 自定义字体
【发布时间】:2014-04-15 20:18:01
【问题描述】:
@font-face {
  font-family: 'Placeholder-Font';
  src: url('<?php echo base_url() ?>assets/fonts/Placeholder-Font.otf') format("opentype");
}

* {
    font-family: Placeholder-Font !important;
}

当我把它放在我的 css 文件中时,确保目录等是正确的,我的浏览器 (Chrome) 默认使用 Times Roman 字体。不知道我在这里做错了什么。

我已经检查了目录、文件名等。

【问题讨论】:

  • 您同意在 CSS 文件中使用 PHP 吗?

标签: css codeigniter fonts


【解决方案1】:

不要使用&lt;?php echo base_url() ?&gt;,而是使用../,这意味着在目录上。

【讨论】:

    猜你喜欢
    • 2019-08-05
    • 2015-07-15
    • 2016-11-29
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2010-11-25
    相关资源
    最近更新 更多