SCSS循环遍历数组
2021-06-08 18:04
标签:through scss 遍历数组 nav 遍历 cti font alpha i+1 结构: SCSS: SCSS循环遍历数组 标签:through scss 遍历数组 nav 遍历 cti font alpha i+1 原文地址:https://www.cnblogs.com/xym0710/p/14511530.html$icon-color: #00fdfb, #ffd200, #fb5911, #2cf698, #5da6fb, #d75efb, #9fff10;
@for $i from 1 through length($icon-color) {
$item: nth($icon-color, $i);
&.item_#{$i} {
background: rgba($color: $item, $alpha: 0.15);
border: 1px solid $item;
color: $item;
}
&.active {
border-width: 2px;
font-weight: bold;
}
}