css样式不起作用问题
function index(){
$this->load->view("index");
}
我在控制器上是这样调用的
页面上css样式不起作用了
<link href="images/style.css" type="text/css" rel="stylesheet" />
路径正确的。。。:L 为什么没用。 RewriteEngine on
RewriteCond $1 !^(index\.php|images|robots\.txt|css)
RewriteRule ^(.*)$ /ci/index.php/$1
隐藏index.php
这样配置算不算css也不读? 写完整css的url 应该是CSS路径的问题.
<?php echo base_url().'images/style.css';?> <?php echo base_url().'images/style.css';?>
没用啊:L
http://localhost/ci/images/style.css 显示这个路径 搞定了。自己SB了。。。。。。
感谢楼上2位:lol 楼主,能不能分享一下如何弄好的? <link href="images/style.css" type="text/css" rel="stylesheet" />
改成这样
<link href="<?php echo base_url().'images/style.css';?>" type="text/css" rel="stylesheet" />
我吧css文件放在相应位置就好了 这个问题想了好久了,没想到。
页:
[1]