鉴于我已经创建了以下动画scss mixin,并特别定义了每个动画
@mixin animation (
$name: none,
$duration: 0s,
$timingFunction: ease,
$delay: 0s,
$iterationCount: 1,
$direction: normal,
$fillMode: none,
$playState: running
) {
$animationPrefixes: '' '-webkit-' '-moz-';
@each $animationPrefix in $animationPrefixes {
#{$animationPrefix}animation-name: $name;
#{$animationPrefix}animation-duration: $duration;
#{$animationPrefix}animation-timing-function: $timingFunction;
#{$animationPrefix}animation-delay: $delay;
#{$animationPrefix}animation-iteration-count: $iterationCount;
#{$animationPrefix}animation-direction: $direction;
#{$animationPrefix}animation-play-state: $playState;
}
}
来自my gist file。
仅使用
会更好吗animation $name $duration $timingFunction $delay $iterationCount $direction $playState;
任何一种方法都能给我带来好处,或者任何方法都没有任何作用,有人可以给我链接吗?