效果图:
/*小三角颜色变化 .scss*/
$list: #1AA818 #D50806 #FF7301;
$len: length($list);
//调用:
@for $i from 1 through $len{
.promotion-word .triangle#{$i}{
border-top-color: nth($list,$i);
}
}
效果图:
/*小三角颜色变化 .scss*/
$list: #1AA818 #D50806 #FF7301;
$len: length($list);
//调用:
@for $i from 1 through $len{
.promotion-word .triangle#{$i}{
border-top-color: nth($list,$i);
}
}