SASS /指南针转换

是否可以使用Compass或SASS输出以下CSS转换,该转换将输出所有各种供应商前缀:

-webkit-transition: all 0.3s ease-in-out;

谁能指出我正确的图书馆?

Gil斯丁2020/03/24 09:55:25

使用单个或“所有”属性转换创建动画的Mixin

@include transition(PROPERTY DURATION DELAY(OPT) TIMING-FUNCTION)
@mixin transition($transition) {
  -webkit-transition: $transition;
     -moz-transition: $transition;
      -ms-transition: $transition;
       -o-transition: $transition;
          transition: $transition;
}

使用多个属性过渡来创建动画的Mixin

@include multi-transition("PROPERTY DURATION DELAY(OPT) TIMING-FUNCTION, PROPERTY DURATION DELAY(OPT) TIMING-FUNCTION")
@mixin multi-transition($transition) {
 -webkit-transition: #{$transition};
    -moz-transition: #{$transition};
     -ms-transition: #{$transition};
      -o-transition: #{$transition};
         transition: #{$transition};
}
泡芙前端2020/03/24 09:55:25

使用指南针的transitionmixin

@include transition(all 0.3s ease-in-out);
米亚2020/03/24 09:55:25

SASS混音

@mixin transition($transition){
     -webkit-transition: $transition;
     -moz-transition: $transition;
     -o-transition: $transition;
     transition: $transition;
}

@include transition(all 0.3s ease-in-out);