【发布时间】:2020-11-29 05:20:42
【问题描述】:
我需要为我的 html 设置背景图片。我有一个文件系统 静态
- CSS
- img
这是我用来链接我的 css 文件的。
<link rel="stylesheet" href="{{ url_for('static',filename='css/index.css') }}">
在我的 css 文件中,我定义了背景图像
.bgimg-1 {background-image: url("/static/img/background.jpg");}
但是在我的烧瓶应用程序中,我收到了错误
127.0.0.1 - - [09/Aug/2020 19:10:04] "[37mGET / HTTP/1.1[0m" 200 -
127.0.0.1 - - [09/Aug/2020 19:10:04] "[33mGET /static/css/static/img/background.jpg HTTP/1.1[0m" 404 -
我不确定/static/css/ 来自哪里
我在<header class="bgimg-1 w3-display-container w3-grayscale-min" id="home">中定义了类
【问题讨论】:
标签: python html css flask web-development-server