Problem Description:
Reference css in home page idex.html, (css file is no problem)
<link rel="stylesheet" type="text/css" href="/static/css/reset.css">
<link rel="stylesheet" type="text/css" href="/static/css/animate.css">
<link rel="stylesheet" type="text/css" href="/static/css/style.css">
The default static folder path is also set in the configuration
STATIC_URL = '/static/'
STATICFILES_DIRS = (
os.path.join(BASE_DIR, 'static'),
)
However, when running, the home page is not displayed normally, and the initial judgment is that the css fails to load.
Right-click the page and select inspect, refresh the page, view the Network, and show that each file path and loading are correct. . . .
After worrying for a long time, I re-examined the entire operation and loading process, and found no problems
However, inadvertently, I replaced the browser with the built-in Safari, and the display was normal. The Google Chrome I used before was still abnormal, and I can't know why for the time being.
Make a note of this:
1. When the subsequent web pages are not loaded normally, change the browser and try again;
Second, if you read this article, please answer.