0
我无法实现与SCSS calc
以下两个属性:为什么在这个SCSS无效性
transform
margin-bottom
这里是我的SCSS:
@for $i from 1 through 12 {
div:first-child:nth-last-child(#{$i}),
div:first-child:nth-last-child(#{$i})~div {
transform: scale(calc(1-(#{$i}*.1)), calc(1-(#{$i}*.1)));
margin-bottom: calc(20-#{$i})+px;
}
}
这是我的输出css为i=1
:
div:first-child:nth-last-child(1),
div:first-child:nth-last-child(1) ~ div {
transform: scale(calc(1-(1*.1)), calc(1-(1*.1)));
margin-bottom: calc(20-1)px;
}
但是在使用chrome dev工具进行检查时,我总是收到invalid property value
这两个css属性。任何想法为什么这可能会发生?