LESSCSS method with IE FIlter Alpha Opacity CSS

后端 未结 5 1337
终归单人心
终归单人心 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:08

    This might help someone :)

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

提交回复
热议问题