scss 循环造成的问题
来源:8-10 完成的 storybook 的架构,给剩下的组件添加 stories

香饽饽0
2020-05-13
.cube-loading-spinner {
position: absolute;
left: 44.5%;
top: 37%;
width: 2px; // for rem
height: 25%;
border-radius: 50%/20%;
opacity: 0.25;
background-color: currentColor;
animation: spinner-fade 1s linear infinite;
@for $i from 1 through 12 {
&:nth-child(#{$i}) {
animation-delay: (($i - 1) / 12)s;
transform: rotate(30deg * ($i - 6)) translateY(-150%);
}
}
}
有多余空格,如何解决
写回答
1回答
-
香饽饽0
提问者
2020-05-13
animation-delay: ($i - 1) * 0.08333333333333333s;
改成乘法即五问题,感觉 scss 需要去优化这一点。
00
相似问题