css - Base_url 在 codeigniter 3 上调用外部 css

标签 css codeigniter codeigniter-3

我的结构是这样的

ci3
 -application
 -assets
    -css
      -home
        -main.css
    -fonts
      -home
      -icon
        -font-awesome

我有一些麻烦,在 main.css 中调用 font-awesome。 怎么调用它?实际上,这是我的代码:

@font-face {
  font-family: 'FontAwesome';
  src: url('???');  //how to call it ?
  font-weight: normal;
  font-style: normal;
}

最佳答案

鉴于 CSS 代码,您可以返回三个目录/文件夹,然后导航到您的 font-awesome 文件。检查扩展程序。

@font-face {
  font-family: 'FontAwesome';
  src: url('../../../fonts/icon/font-awesome');  /* Go to assets folder */
  font-weight: normal;
  font-style: normal;
}

关于css - Base_url 在 codeigniter 3 上调用外部 css,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32535320/

相关文章:

php - 网络应用 : code from the ground up or use 3rd party framework?

php - 通过ajax php删除行

php - mysql_query ("START TRANSACTION")- 超过锁定等待超时;尝试在 Codeigniter Mysql 中重新启动事务

php - 在 PHPSpreadsheet 上循环后添加单元格

javascript - 测序产品列表

javascript - 如果中途发生另一个事件,如何重置 clickToggle 函数

html - Internet Explorer 7 菜单换行

javascript - 媒体查询在 IE8 中不起作用

css - 移动设备上的高度问题

php - 将数百万张图像导入、调整大小并上传到 Amazon S3