django學習總結

頁面樣式的配置 1、在setting中配置路徑 STATIC_URL = '/static/' STATIC_ROOT = os.path.join(BASE_DIR, 'static') 2、在html模板中引用 {% load static %} <link rel="stylesheet" type="text/css" href="\static\main.css"> <img src="
相關文章
相關標籤/搜索