【发布时间】:2020-10-11 03:22:32
【问题描述】:
我想知道是否可以将变量从 Django 视图传递到 CSS 文件?有什么办法吗? 我正在关注前端设计中的一些教程,想知道它是否可以在 Django 中动态构建?
.card:nth-child(1) svg circle:nth-child(2){
stroke-dashoffset: calc(440 - (440 * 90) / 100);
stroke: #00ff43;
}
.card:nth-child(2) svg circle:nth-child(2){
stroke-dashoffset: calc(440 - (440 * 80) / 100);
stroke: #00a1ff;
}
.card:nth-child(3) svg circle:nth-child(2){
stroke-dashoffset: calc(440 - (440 * 60) / 100);
stroke: #ff04f7;
}
stroke-dashoffset: calc(440 - (440 * {{ var }}) / 100);
【问题讨论】:
标签: css django django-views