摘要:
loop循环 example: .test(@i) when (@i > 0) { .test((@i - 1)); .study@{i} { width: (10px * @i); } } div{ .test(2); } //output css div .study1 { width: 10p 阅读全文
摘要:
mixin卫士--判断 或与且语法 且:()and() 或:(),() --且 examlpe: .test(@a) when (isNumber(@a)) and (@a>=5){ font-size:unit(@a,px); } .study{ .test(10); } //output css 阅读全文
摘要:
mixin卫士--判断 类似于JavaScript的if/else example: .test(@a) when (@a>10){//当大于10 font-size:18px; } .test(@a) when (@a<=10){//当小于等于10 font-size:12px; } .test( 阅读全文
摘要:
//@import 导入选项 --@import 可以至于任何你需要导入的地方 在标准的CSS,@import在规则必须先于所有其他类型的规则。但Less.js不关心 example: .test(){ color:#ff6a00; } .study{ .test; } @import "study 阅读全文