motion.less 766 字节
Newer Older
Y
yiminghe 已提交
1
.motion-common() {
偏右 已提交
2
  animation-duration: .3s;
Y
yiminghe 已提交
3
  animation-fill-mode: both;
A
afc163 已提交
4 5
}

Y
yiminghe 已提交
6
.make-motion(@className, @keyframeName) {
Y
yiminghe 已提交
7
  .@{className}-enter, .@{className}-appear {
Y
yiminghe 已提交
8
    .motion-common();
A
afc163 已提交
9 10 11
    animation-play-state: paused;
  }
  .@{className}-leave {
Y
yiminghe 已提交
12
    .motion-common();
A
afc163 已提交
13 14
    animation-play-state: paused;
  }
Y
yiminghe 已提交
15
  .@{className}-enter.@{className}-enter-active, .@{className}-appear.@{className}-appear-active {
A
afc163 已提交
16 17 18 19 20 21 22
    animation-name: ~"@{keyframeName}In";
    animation-play-state: running;
  }
  .@{className}-leave.@{className}-leave-active {
    animation-name: ~"@{keyframeName}Out";
    animation-play-state: running;
  }
A
afc163 已提交
23 24
}

Y
yiminghe 已提交
25 26 27 28 29
@import "motion/fade";
@import "motion/move";
@import "motion/other";
@import "motion/slide";
@import "motion/swing";
偏右 已提交
30
@import "motion/zoom";