是否可以使用 Compass 或 SASS 输出以下 CSS 转换,该转换将输出所有各种供应商前缀:
-webkit-transition: all 0.3s ease-in-out;
谁能指出我正确的图书馆?
是否可以使用 Compass 或 SASS 输出以下 CSS 转换,该转换将输出所有各种供应商前缀:
-webkit-transition: all 0.3s ease-in-out;
谁能指出我正确的图书馆?
@include transition(all 0.3s ease-in-out);
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};
}
SASS 混合
@mixin transition($transition){
-webkit-transition: $transition;
-moz-transition: $transition;
-o-transition: $transition;
transition: $transition;
}
@include transition(all 0.3s ease-in-out);