我的 base.html
...
<body>
{% include 'parts/navbar.html' %}
<div>This is the base content html file</div>
{% block content %}
{% endblock %}
{% include 'parts/footer.html' %}
</body>
...
我的導航欄:
<div>NAV</div>
我的頁腳:
<div>Footer</div>
<style>
div {
color: blueviolet;
}
</style>
頁腳樣式也適用于我不想要的導航 div。Django 中的范圍樣式是否可能,或者我是否必須使用線條樣式或某些引擎等。
uj5u.com熱心網友回復:
Django 不處理那個。您可以使用https://sass-lang.com/guide并嵌套您的 CSS。
轉載請註明出處,本文鏈接:https://www.uj5u.com/caozuo/328501.html
下一篇:在CSS中定位影像
