全国热线电话:13633878273
发布时间: 2014-11-29 16:18:38
less支持加减乘除
@init: #111111;
@transition: @init*3;
.switchColor {
color: @transition;
}
CSS 文件
.switchColor { color: #222222; } |
LESS 提供的针对颜色操作的函数列表:
lighten(@color, 10%); // return a color which is 10% *lighter* than @color darken(@color, 10%); // return a color which is 10% *darker* than @color saturate(@color, 10%); // return a color 10% *more* saturated than @color desaturate(@color, 10%);// return a color 10% *less* saturated than @color fadein(@color, 10%); // return a color 10% *less* transparent than @color fadeout(@color, 10%); // return a color 10% *more* transparent than @color spin(@color, 10); // return a color with a 10 degree larger in hue than @color spin(@color, -10); // return a color with a 10 degree smaller hue than @color |
Comments(注释)
LESS 对注释也提供了支持,主要有两种方式:单行注释和多行注释,这与 JavaScript 中的注释方法一样。
单行注释//,多行注释/* */。