motion.less 770 字节
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) {
A
afc163 已提交
7 8
  .@{className}-enter,
  .@{className}-appear {
Y
yiminghe 已提交
9
    .motion-common();
A
afc163 已提交
10 11 12
    animation-play-state: paused;
  }
  .@{className}-leave {
Y
yiminghe 已提交
13
    .motion-common();
A
afc163 已提交
14 15
    animation-play-state: paused;
  }
A
afc163 已提交
16 17
  .@{className}-enter.@{className}-enter-active,
  .@{className}-appear.@{className}-appear-active {
A
afc163 已提交
18 19 20 21 22 23 24
    animation-name: ~"@{keyframeName}In";
    animation-play-state: running;
  }
  .@{className}-leave.@{className}-leave-active {
    animation-name: ~"@{keyframeName}Out";
    animation-play-state: running;
  }
A
afc163 已提交
25 26
}

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