【发布时间】:2019-03-05 07:36:48
【问题描述】:
我想在 style.css 文件中使用自定义字体,该字体将由 StaticFiles 提供服务
我知道我可以用这样的方式对其进行硬编码:
@font-face {
font-family:"NotoSansArabic";
font-style:normal;
src:
url("/static/myApp/fonts/NotoSansArabicUI-ExtraBold.ttf") format("truetype")
}
我正在寻找类似的东西:
{% static 'myApp/fonts/NotoSansArabicUI-ExtraBold.ttf' %}
还有其他方法吗?
font 和 style.css 都作为Static
【问题讨论】:
标签: python django django-templates