LESSCSS method with IE FIlter Alpha Opacity CSS

后端 未结 5 1340
终归单人心
终归单人心 2021-02-04 00:19

I am using LESSCSS. I\'m trying to create a method for opacity:

.opacity (@opacity) 
{
    opacity: @opacity;
    -ms-filter: \"progid:DXImageTransform.Microsof         


        
5条回答
  •  星月不相逢
    2021-02-04 01:06

    naaa .. this one worked for me:

    .opacity(@a:0.5){
        zoom:1;
        opacity: @a;
        -moz-opacity: @a;
        @iea : @a*100;
        -ms-filter: ~"progid:DXImageTransform.Microsoft.Alpha(opacity=(@{iea}))";
        filter:~"alpha(opacity= @{iea})";
    }
    

提交回复
热议问题