【发布时间】:2019-03-12 18:50:14
【问题描述】:
我正在尝试在 styled-components 文档中找到一种方法来创建循环。例如,我可以在 styled-components 中实现这个scss 循环吗?
@for $i from 0 through 20 {
#loadingCheckCircleSVG-#{$i} {
animation: fill-to-white 5000ms;
animation-delay: ($i - 1.5) * 1s;
fill: white;
opacity: 0;
}
}
有可能吗?
【问题讨论】:
-
我相信 styled-components 主要是 js。因此,请使用 js for loop
标签: javascript reactjs styled-components