0

我需要能够减少变量

/* 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)

4

1 回答 1

0

答案很简单,添加@{var}以便较少知道它是一个变量而不是文本

-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=@{ieOpacity})";
于 2012-08-21T09:13:31.743 回答