php - @Font-Face 在 codeigniter 中不工作

标签 php css codeigniter fonts

我只是困惑为什么我的 CSS 代码不起作用。 我在这个元素中使用 codeigniter。

我有一个名为“Viner Hand ITC”的字体,我将所有格式放在我的根目录中,并带有一个名为“font”的子文件夹,但它不起作用。

看看这个。

@font-face {
        font-family: "Viner Hand ITC";
        src: url('font/435028077-27990.eot');
        src: url('font/435028077-27990.eot?#iefix') format('embedded-opentype'),
        url('font/435028077-27990.svg#Viner Hand ITC') format('svg'),
        url('font/435028077-27990.woff') format('woff'),
        url('font/435028077-27990.ttf') format('truetype');
        font-weight: normal;
        font-style: normal;
    }

body {
        background : #000!important;
        color: #fff;
        text-align: justify;
        font-family: "Viner Hand ITC"!important;
        direction: ltr;
}

但是当我打开我的页面时,它总是使用默认字体..

最佳答案

许多浏览器不支持具有 src 属性的字体系列。检查您的浏览器。

关于php - @Font-Face 在 codeigniter 中不工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24946871/

相关文章:

php - 使用 CodeIgniter 使标题字符串成为所有页面的整个 URI

php - mySQL 查询 WHERE...OR... 快捷方式

php - PHP 使用什么子字符串算法(查找字符串)?

css - 页面的移动呈现在小 View 中加载完整的垂直页面

html - 如何为地铁用户界面创建具有响应高度的网页?

javascript - CKEditor缓存问题,编辑皮肤css

php - 如何从 CodeIgniter 中的目录文件夹中删除上传的图像

php - Zend Mysql 获取 ENUM 值

php - 如何在两个本地主机之间同步 mysql 数据库?

javascript - 结果在没有页面加载的情况下发生变化