使用 CodeIgniter 的 CSS 文件注释


CSS file note working with CodeIgniter

我是Codeigniter的新生。我已经为我的设计制作了一个HTML页面,并根据分区标签将它们分开。在文件名 head.php(在视图文件夹中,我添加了我的设计的 CSS。但是我的 CSS 不起作用。请帮助我。提前谢谢。

试试这个,

在您看来,把这个

<link href="<?php echo base_url(); ?>css/your_css.css" rel="stylesheet" type="text/css"></link> 

然后在 CI 文件夹下创建一个文件夹

  • CI 文件夹

    • 应用
    • 系统
    • CSS
    • - 将您的 CSS 放在此文件夹中

将 css 文件放到存储 index.php 的基文件夹中并使用它。如果您想将其存储在其他地方,请使用 codeigniter 中的base_url();函数 http://ellislab.com/codeigniter/user-guide/helpers/url_helper.html