【发布时间】:2017-03-29 00:17:34
【问题描述】:
我似乎找不到任何具体的答案,尽管我更倾向于说这是不可能的。
但是,是否可以在外部 CSS 文件中使用 Thmymeleaf 表达式?例如,如果我有 main.css 并且它包含:
body {
font-size: [[${fooBean.isLarge ? '22px;' : '16px;' }]];
}
.header {
margin-top:
background: url{[[${fooBean.isMain ? '/img/blue.jpg' : '/img/red.jpg' }]]}
no-repeat center center fixed;
}
这完全可以使用 Thymeleaf 吗?
【问题讨论】: