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