How to generate CSS with loop in less

前端 未结 4 1669
执念已碎
执念已碎 2020-12-05 04:33

I am not familiar with Less. In my understanding, I think Less can transform the less format file to standard css file(if

4条回答
  •  半阙折子戏
    2020-12-05 04:50

    Please note, that since version 3.7 Less has an each() function, which can be easily used with the range() function to produce the wanted code - like this:

    each(range(100),{
        .span@{value} { width: @value * 1%; }
    });
    

提交回复
热议问题