motion.less 2.6 KB
Newer Older
Y
yiminghe 已提交
1
.effect() {
A
afc163 已提交
2
  animation-duration: 0.25s;
Y
yiminghe 已提交
3 4
  animation-fill-mode: both;
  display: block !important;
A
afc163 已提交
5 6
}

Y
yiminghe 已提交
7 8 9 10 11
.zoom-enter {
  opacity: 0;
  .effect();
  animation-timing-function: cubic-bezier(0.18, 0.89, 0.32, 1.28);
  animation-play-state: paused;
A
afc163 已提交
12 13
}

Y
yiminghe 已提交
14 15 16 17
.zoom-leave {
  .effect();
  animation-timing-function: cubic-bezier(0.6, -0.3, 0.74, 0.05);
  animation-play-state: paused;
A
afc163 已提交
18 19
}

Y
yiminghe 已提交
20 21 22
.zoom-enter.zoom-enter-active {
  animation-name: zoomIn;
  animation-play-state: running;
A
afc163 已提交
23 24
}

Y
yiminghe 已提交
25 26 27
.zoom-leave.zoom-leave-active {
  animation-name: zoomOut;
  animation-play-state: running;
A
afc163 已提交
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54
}

@keyframes zoomIn {
  0% {
    opacity: 0;
    transform-origin: 50% 50%;
    transform: scale(0, 0);
  }
  100% {
    opacity: 1;
    transform-origin: 50% 50%;
    transform: scale(1, 1);
  }
}
@keyframes zoomOut {
  0% {
    opacity: 1;
    transform-origin: 50% 50%;
    transform: scale(1, 1);
  }
  100% {
    opacity: 0;
    transform-origin: 50% 50%;
    transform: scale(0, 0);
  }
}

Y
yiminghe 已提交
55 56 57 58 59 60
.slide-up-enter {
  .effect();
  transform-origin: 0 0;
  opacity: 0;
  animation-timing-function: cubic-bezier(0.08, 0.82, 0.17, 1);
  animation-play-state: paused;
A
afc163 已提交
61 62
}

Y
yiminghe 已提交
63 64 65 66 67 68
.slide-up-leave {
  .effect();
  transform-origin: 0 0;
  opacity: 1;
  animation-timing-function: cubic-bezier(0.6, 0.04, 0.98, 0.34);
  animation-play-state: paused;
A
afc163 已提交
69 70
}

Y
yiminghe 已提交
71 72 73
.slide-up-enter.slide-up-enter-active {
  animation-name: slideUpIn;
  animation-play-state: running;
A
afc163 已提交
74
}
Y
yiminghe 已提交
75 76 77 78

.slide-up-leave.slide-up-leave-active {
  animation-name: slideUpOut;
  animation-play-state: running;
A
afc163 已提交
79
}
Y
yiminghe 已提交
80 81

@keyframes slideUpIn {
A
afc163 已提交
82 83 84 85 86 87 88 89 90 91 92
  0% {
    opacity: 0;
    transform-origin: 0% 0%;
    transform: scaleY(0);
  }
  100% {
    opacity: 1;
    transform-origin: 0% 0%;
    transform: scaleY(1);
  }
}
Y
yiminghe 已提交
93
@keyframes slideUpOut {
A
afc163 已提交
94 95 96 97 98 99 100 101 102 103 104 105
  0% {
    opacity: 1;
    transform-origin: 0% 0%;
    transform: scaleY(1);
  }
  100% {
    opacity: 0;
    transform-origin: 0% 0%;
    transform: scaleY(0);
  }
}

Y
yiminghe 已提交
106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126
.fade-enter {
  opacity: 0;
  .effect();
  animation-timing-function: cubic-bezier(0.55, 0, 0.55, 0.2);
  animation-play-state: paused;
}

.fade-leave {
  .effect();
  animation-timing-function: cubic-bezier(0.55, 0, 0.55, 0.2);
  animation-play-state: paused;
}

.fade-enter.fade-enter-active {
  animation-name: fadeIn;
  animation-play-state: running;
}

.fade-leave.fade-leave-active {
  animation-name: fadeOut;
  animation-play-state: running;
A
afc163 已提交
127
}
Y
yiminghe 已提交
128 129

@keyframes fadeIn {
A
afc163 已提交
130 131 132 133 134 135 136 137
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

Y
yiminghe 已提交
138
@keyframes fadeOut {
A
afc163 已提交
139 140 141 142 143 144 145 146
  0% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

S
simaQ 已提交
147 148 149 150 151 152 153 154 155 156
@keyframes loadingCircle {
  0% {
    transform-origin: 50% 50%;
    transform: rotate(0deg);
  }
  100% {
    transform-origin: 50% 50%;
    transform: rotate(360deg);
  }
}