![](/img/trans.png)
[英]Use Flask to serve both static CSS and static video files
[英]Flask and css reference to static files
我有一个基本的烧瓶应用程序,在其中我像这样在css文件中引用背景图像
.three {
background:url('/static/images/house.jpg');
}
我的文件夹组织是这样的:
project
app.py
-static
-images
house.jpg
-css
index.css
-templates
index.html
如何获取CSS以正确调用图像?
将您的css更改为此,然后再试一次:
.three {
background-image: url('images/house.jpg');
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.