swing.less 614 字节
Newer Older
Y
yiminghe 已提交
1
.swing-motion(@className, @keyframeName) {
Y
yiminghe 已提交
2
  .@{className}-enter, .@{className}-appear {
Y
yiminghe 已提交
3 4 5
    .motion-common();
    animation-play-state: paused;
  }
Y
yiminghe 已提交
6
  .@{className}-enter.@{className}-enter-active, .@{className}-appear.@{className}-appear-active {
Y
yiminghe 已提交
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
    animation-name: ~"@{keyframeName}In";
    animation-play-state: running;
  }
}

.swing-motion(swing, swing);

@keyframes swingIn {
  0%, 100% {
    transform: translateX(0px);
  }
  20% {
    transform: translateX(-10px);
  }
  40% {
    transform: translateX(10px);
  }
  60% {
    transform: translateX(-5px);
  }
  80% {
    transform: translateX(5px);
  }
Y
yiminghe 已提交
30
}