1 | .move-enter,
|
2 | .move-appear {
|
3 | opacity: 0;
|
4 | animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);
|
5 | animation-duration: 2.5s;
|
6 | animation-fill-mode: both;
|
7 | animation-play-state: paused;
|
8 | }
|
9 | .move-leave {
|
10 | animation-timing-function: cubic-bezier(0.55, 0.055, 0.675, 0.19);
|
11 | animation-duration: 0.5s;
|
12 | animation-fill-mode: both;
|
13 | animation-play-state: paused;
|
14 | }
|
15 | .move-enter.move-enter-active,
|
16 | .move-appear.move-enter-active {
|
17 | animation-name: moveLeftIn;
|
18 | animation-play-state: running;
|
19 | }
|
20 | .move-leave.move-leave-active {
|
21 | animation-name: moveRightOut;
|
22 | animation-play-state: running;
|
23 | }
|
24 | @keyframes moveLeftIn {
|
25 | 0% {
|
26 | transform-origin: 0 0;
|
27 | transform: translateX(30px);
|
28 | opacity: 0;
|
29 | background: #fff6de;
|
30 | }
|
31 | 20% {
|
32 | transform-origin: 0 0;
|
33 | transform: translateX(0);
|
34 | opacity: 1;
|
35 | }
|
36 | 80% {
|
37 | background: #fff6de;
|
38 | }
|
39 | 100% {
|
40 | background: transparent;
|
41 | opacity: 1;
|
42 | }
|
43 | }
|
44 | @keyframes moveRightOut {
|
45 | 0% {
|
46 | transform-origin: 0 0;
|
47 | transform: translateX(0);
|
48 | opacity: 1;
|
49 | }
|
50 | 100% {
|
51 | transform-origin: 0 0;
|
52 | transform: translateX(-30px);
|
53 | opacity: 0;
|
54 | }
|
55 | }
|