我购买了bootstrap主题,并且.css
文件是这样的:
@font-face {
font-family: 'fontello';
src: url("../../assets/fonts/fontello/fontello.eot");
src: url("../../assets/fonts/fontello/fontello-.eot#iefix") format('embedded-opentype'), url("../../assets/fonts/fontello/fontello.woff") format('woff'), url("../../assets/fonts/fontello/fontello.ttf") format('truetype'), url("../../assets/fonts/fontello/fontello.svg#fontello") format('svg');
font-weight: normal;
font-style: normal;
}
但是我想使用Django static template
所以我改变了它,如下所示:
{% load staticfiles %}
@font-face {
font-family: 'fontello';
src: url("{% static 'fonts/fontello/fontello.eot' %}");
src: url("{% static 'fonts/fontello/fontello-.eot#iefix' %}") format('embedded-opentype'), url("{% static 'fonts/fontello/fontello.woff' %}") format('woff'), url("{% static 'fonts/fontello/fontello.ttf' %}") format('truetype'), url("{% static 'fonts/fontello/fontello.svg#fontello' %}") format('svg');
font-weight: normal;
font-style: normal;
}
但它不起作用。 {% load staticfiles %}
仅适用于html
文件?
然后我如何在css
文件中处理它?</ p>