【发布时间】:2018-09-02 10:58:53
【问题描述】:
使用 SCSS,我可以像这样创建 CSS 魔法:
@for $i from 1 through $total-items {
li:nth-child(#{$i}) {
animation-delay: .25s * $i;
}
}
我现在正在开发一个使用样式化组件的 React 应用程序。样式化的组件是否以某种方式允许上述情况?
【问题讨论】:
-
你可以用javascript做同样的事情,去掉中间人
标签: css reactjs sass styled-components