2015-07-01 17:25:16 +08:00
|
|
|
.move-motion(@className, @keyframeName) {
|
|
|
|
.make-motion(@className, @keyframeName);
|
|
|
|
.@{className}-enter {
|
|
|
|
opacity: 0;
|
2015-07-09 11:04:45 +08:00
|
|
|
animation-timing-function: @ease-out-circ;
|
2015-07-01 17:25:16 +08:00
|
|
|
}
|
|
|
|
.@{className}-leave {
|
2015-07-09 11:04:45 +08:00
|
|
|
animation-timing-function: @ease-in-circ;
|
2015-07-01 17:25:16 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.move-motion(move-up, moveUp);
|
|
|
|
.move-motion(move-down, moveDown);
|
|
|
|
.move-motion(move-left, moveLeft);
|
|
|
|
.move-motion(move-right, moveRight);
|
|
|
|
|
|
|
|
@keyframes moveDownIn {
|
|
|
|
0% {
|
|
|
|
transform-origin: 0 0;
|
|
|
|
transform: translateY(100%);
|
|
|
|
opacity: 0;
|
|
|
|
}
|
|
|
|
100% {
|
|
|
|
transform-origin: 0 0;
|
|
|
|
transform: translateY(0%);
|
|
|
|
opacity: 1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@keyframes moveDownOut {
|
|
|
|
0% {
|
|
|
|
transform-origin: 0 0;
|
|
|
|
transform: translateY(0%);
|
|
|
|
opacity: 1;
|
|
|
|
}
|
|
|
|
100% {
|
|
|
|
transform-origin: 0 0;
|
|
|
|
transform: translateY(100%);
|
|
|
|
opacity: 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@keyframes moveLeftIn {
|
|
|
|
0% {
|
|
|
|
transform-origin: 0 0;
|
|
|
|
transform: translateX(-100%);
|
|
|
|
opacity: 0;
|
|
|
|
}
|
|
|
|
100% {
|
|
|
|
transform-origin: 0 0;
|
|
|
|
transform: translateX(0%);
|
|
|
|
opacity: 1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@keyframes moveLeftOut {
|
|
|
|
0% {
|
|
|
|
transform-origin: 0 0;
|
|
|
|
transform: translateX(0%);
|
|
|
|
opacity: 1;
|
|
|
|
}
|
|
|
|
100% {
|
|
|
|
transform-origin: 0 0;
|
|
|
|
transform: translateX(-100%);
|
|
|
|
opacity: 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@keyframes moveRightIn {
|
|
|
|
0% {
|
|
|
|
opacity: 0;
|
|
|
|
transform-origin: 0 0;
|
|
|
|
transform: translateX(100%);
|
|
|
|
}
|
|
|
|
100% {
|
|
|
|
opacity: 1;
|
|
|
|
transform-origin: 0 0;
|
|
|
|
transform: translateX(0%);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@keyframes moveRightOut {
|
|
|
|
0% {
|
|
|
|
transform-origin: 0 0;
|
|
|
|
transform: translateX(0%);
|
|
|
|
opacity: 1;
|
|
|
|
}
|
|
|
|
100% {
|
|
|
|
transform-origin: 0 0;
|
|
|
|
transform: translateX(100%);
|
|
|
|
opacity: 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@keyframes moveUpIn {
|
|
|
|
0% {
|
|
|
|
transform-origin: 0 0;
|
|
|
|
transform: translateY(-100%);
|
|
|
|
opacity: 0;
|
|
|
|
}
|
|
|
|
100% {
|
|
|
|
transform-origin: 0 0;
|
|
|
|
transform: translateY(0%);
|
|
|
|
opacity: 1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@keyframes moveUpOut {
|
|
|
|
0% {
|
|
|
|
transform-origin: 0 0;
|
|
|
|
transform: translateY(0%);
|
|
|
|
opacity: 1;
|
|
|
|
}
|
|
|
|
100% {
|
|
|
|
transform-origin: 0 0;
|
|
|
|
transform: translateY(-100%);
|
|
|
|
opacity: 0;
|
|
|
|
}
|
|
|
|
}
|