css效果是:
width: calc(25% - 16px);
$side:20px !default;
$ele:span;
@for $i from 1 through 4{
.#{$ele}-#{$i}{
width:calc(100% - #{$side} * #{$i});
}
}
@for $i from 1 through 4{ $width:25%*$i; $margin:16px; .gd-cell--#{$i}-col, .gd-cell--#{$i}-col-phone.gd-cell--#{$i}-col-phone{ width: calc(#{$width} - #{$margin}); } }
你这个需要减不同的像素大小吗?
width: calc(25% - 16px/32px/48px);