P
P
Pure_noob2016-09-08 13:19:06
Sass
Pure_noob, 2016-09-08 13:19:06

How to make a loop for pictures?

There are 6 blocks items-1, items-2, items-3 etc. how to make through a loop in sass so that each of them has its own background-image ?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey delphinpro, 2016-09-08
@Pure_noob

@for $i from 1 through 3 {
  .items-#{$i} {
    background-image: url(image-#{$i}.jpg);
  }
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question