Django:CSS和图像(静态文件)已成功加载但未应用 [英] Django: CSS and Images (Static Files) loaded successfully but not applied
问题描述
我正在使用Django Dev Server并尝试测试我制作的一些模板.当我访问地址时,我可以从服务器提示符处看到CSS和图像已加载,但是当我在浏览器中查找时,它并没有应用.我也在使用Bootstrap,奇怪的是,它确实得到了应用.
I'm using Django Dev Server and trying to test some templates I've made. When I visit addresses, I can see from the server prompt that CSS and images are loaded, but when I'm looking in a browser it is not applied. I'm also using Bootstrap and strangely enough, it does get applied.
我真的想要一些帮助.我已经看到(并实现了)其他各种线程的解决方案,但毫无用处.请帮忙!
I would really like some help. I've seen (and implemented) the solution from various other threads with no avail. Please Help!
我见过的线程:
推荐答案
在启动后为我工作后移动CSS.
Moving the CSS after bootstrap worked for me.
赞
< link href ="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" type ="text/css" rel ="stylesheet">< link rel ="stylesheet" type ="text/css" href ="{%static'css/checkout.css'%}">
这篇关于Django:CSS和图像(静态文件)已成功加载但未应用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!