首页 > 代码库 > less 里面 opacity的写法

less 里面 opacity的写法

今天写了个opacity, 竟然less编译不过,上网搜了一个写法

.opacity (@opacity) {    @opacityPercentage: @opacity * 100;    opacity: @opacity;    -ms-filter: ~"progid:DXImageTransform.Microsoft.Alpha(opacity=(@{opacityPercentage}))";     filter: ~"alpha(opacity = (@{opacityPercentage}))";}

in dotless 1.2.3
.opacity (@opacity) {    @opacityPercentage: @opacity * 100;    opacity: @opacity;    -ms-filter: progid:DXImageTransform.Microsoft.Alpha(opacity=(@opacityPercentage));     filter: alpha(opacity = (@opacityPercentage));}