如何在codeigniter中使用自定义字体和图标 [英] how to use custom fonts and icons in codeigniter

查看:216
本文介绍了如何在codeigniter中使用自定义字体和图标的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Slam everyone
i想在我的视图中使用flaticon.com中的自定义图标
http://successpermis.com/css/flaticon.html
as html它工作正常,但是当我使用它在视图内它不工作
i认为问题加载字体

Slam everyone i want to use custom icons from flaticon.com inside my view the icons in http://successpermis.com/css/flaticon.html as html it is working fine , but when i use it inside the view it is not working i think the problem in loading the font


    @font-face {
    font-family: "Flaticon";
    src: url("http://successpermis.com/css/flaticon.eot");
    src: url("http://successpermis.com/css/flaticon.eot#iefix") format("embedded-opentype"),
    url("http://successpermis.com/css/flaticon.woff") format("woff"),
    url("http://successpermis.com/css/flaticon.ttf") format("truetype"),
    url("http://successpermis.com/css/flaticon.svg") format("svg");
    font-weight: normal;
    font-style: normal;
}

我试图从本地文件夹加载字体,然后从在线主机加载字体

i tried to load fonts from local folders then from online host just like the code above can you tell me to do it in a right way

推荐答案

文件夹结构

- application
- assets
    - css 
    - js
    - images
    - fonts

style.css

style.css

  @font-face {
        font-family: "Flaticon";
        src: url("assets/fonts/flaticon.eot");

        -------------
    }

这篇关于如何在codeigniter中使用自定义字体和图标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆