当我在我的URL的末尾添加斜杠(/)时,CSS不工作 [英] CSS doesn't work when I add slash (/) at the end of my url

查看:193
本文介绍了当我在我的URL的末尾添加斜杠(/)时,CSS不工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是新的代码点火器,我不知道为什么我的css不工作,当我添加斜杠(/)在网址的末尾..

I'm new to code igniter and I wonder why my css doesn't work when I add slash ( / ) at the end of the url ..

有人可以帮助我为什么它不工作吗?

Can someone help me why it doesn't work ? And help me make it work ?

推荐答案

尝试将此添加代码添加到您的html head

Try this add code to your html head:

<link rel="stylesheet" href="<?php echo site_url('css/style.css');?>" type="text/css"/>

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

这篇关于当我在我的URL的末尾添加斜杠(/)时,CSS不工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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