sass循环

 

@for $i from 1 through 5 {
  li {
    &:nth-child(#{$i}) {
      .bgImg {
        background-image: url(../images/index/index-icon#{$i}.png);

      }
    }
  }
}

posted @ 2019-07-03 15:37  lucy123  阅读(146)  评论(0编辑  收藏  举报