我需要能够将变量变为
/* Opacity */
.opacity(@opacity: 0.35){
-moz-opacity: @opacity;
-khtml-opacity: @opacity;
-webkit-opacity: @opacity;
opacity: @opacity;
@ieOpacity: @opacity * 100;
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=@ieOpacity)";
filter: ~"alpha(opacity=@ieOpacity)";
}
如果符合此规则,代码在.css文件(Opacity=@ieOpacity)
答案 0 :(得分:0)
答案很简单,添加@{var}
以便少知道它的变量而不是文本
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=@{ieOpacity})";