0
我遇到了我的background template picture
問題。每次我加載Django模板時,我的背景第一次都是黑色的,然後在0.5/1秒後我的圖片變得很好。Django模板背景問題
我在劇本(普通HTML模板)寫道:
{% load staticfiles %}
{% load static %}
{% load user_tags %}
{% load variables %}
<style>
body {
background-image:url("{% get_static_prefix %}{{ mytheme }}/images/bg.jpg");
}
</style>
的url path
因爲我的圖片加載不錯,但我在〜1秒
我以前是沒有這個黑色的背景在我的CSS文件中寫入背景圖片,但只能在我的通用模板(每次調用導航欄模板)中使用。
你有什麼想法嗎?
我的照片是用3Mo在5200x2800。我將它安裝到1920x1080,現在它是145ko。但問題仍然出現 – Andro
它的工作原理,也許她還在緩存中^^ – Andro