How to generate CSS with loop in less
问题 I am not familiar with Less . In my understanding, I think Less can transform the less format file to standard css file(if I am wrong, please correct me). Now I have a question below. Say you would generate 100 CSS classes like below(from .span1 to .span100 ) in a single CSS file. I want to know whether less can generate a CSS file like it? ... .span5 { width: 5%; } .span4 { width: 4%; } .span3 { width: 3%; } .span2 { width: 2%; } .span1 { width: 1%; } 回答1: Try this if you are using the