html - CSS网格未在chrome上显示 - 200错误
问题描述
我无法在不同的浏览器中正确显示我的 CSS 网格。
我在终端“GET /static/stylesheets/style.css HTTP/1.1”200 中收到此错误 -
在左侧的 Firefox 中,一切正常!
右侧的 Chrome 未显示任何 CSS。
知道发生了什么吗?
索引.html:
<!DOCTYPE html>
<head>
<link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='stylesheets/style.css') }}" />
<title>This is the title</title>
</head>
<body>
<h1>Lorem ipsum</h1>
<div class="wrapper">
<div class="item">1</div>
<div class="item">2</div>
<div class="item">3</div>
<div class="item">4</div>
<div class="item item5">5</div>
<div class="item">6</div>
<div class="item">7</div>
<div class="item">8</div>
</div>
</body>
</html>
CSS 文件:
*{
box-sizing: border-box;
margin: 0;
padding: 0;
}
body{
background: white;
}
.wrapper{
width: 90%;
margin: 0 auto;
}
.item{
background: blue;
color: white;
padding: 10px;
}
.item:nth-child(even){
background: orange;
}
路线.py
from flask import Flask, render_template, url_for
from app import app
@app.route('/')
@app.route('/index')
def index():
return render_template('index.html')
初始化.py
from flask import Flask
app = Flask(__name__)
from app import routes
解决方案
推荐阅读
- java - 如何在 QueryDSL BooleanExpression 中使用 SubQeryExpression
- c - Linux内核中的字符设备问题
- asp.net-core - asp.net 核心直播 mp4 流媒体
- python - 从一个文件读取并写入另一个文件
- laravel - 需要从数据透视表中获取相关ID
- android-security - 如何在 TrustManager 中使用 CertificateException?
- wordpress - 如何获取 ACF 关系字段的特色图像
- python - 求和转化率,然后按年龄分组
- java - 转换列表
到 Class... 获取声明的方法 - javascript - 滚动位置固定元素与非固定元素同步