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

.motion-common-leave() {
  animation-duration: .2s;
Y
yiminghe 已提交
8
  animation-fill-mode: both;
A
afc163 已提交
9 10
}

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

Y
yiminghe 已提交
32 33 34 35 36
@import "motion/fade";
@import "motion/move";
@import "motion/other";
@import "motion/slide";
@import "motion/swing";
偏右 已提交
37
@import "motion/zoom";