【发布时间】:2020-08-24 22:14:51
【问题描述】:
我在所有代码中都使用了 scss 变量,如下所示:
$primary: royalblue;
body {
background: $primary;
color: black;
}
.list-item {
// some code
span, a {
background: black;
color: $primary;
}
}
现在,我想为身体背景颜色创建一个动画:
@keyframes bganimation {
from {
$primary: royalblue;
}
to {
$primary: tomato;
}
}
但我知道 scss 是一种可以编译为 css 的语言……还有其他方法吗? 我无法重写代码,请帮助。
【问题讨论】:
标签: css sass css-animations