update animation:fade time

This commit is contained in:
梁灏 2019-09-05 10:52:18 +08:00
parent da404a1d3e
commit 91806ae7f5
5 changed files with 109 additions and 61 deletions

View file

@ -1,5 +1,5 @@
.fade-motion(@className, @keyframeName) {
.make-motion(@className, @keyframeName);
.make-motion(@className, @keyframeName, @animation-time-quick);
.@{className}-enter-active, .@{className}-appear {
opacity: 0;
animation-timing-function: linear;
@ -27,4 +27,4 @@
100% {
opacity: 0;
}
}
}

View file

@ -1,15 +1,15 @@
.motion-common() {
animation-duration: @animation-time;
.motion-common(@time) {
animation-duration: @time;
animation-fill-mode: both;
}
.make-motion(@className, @keyframeName) {
.make-motion(@className, @keyframeName, @time: @animation-time) {
.@{className}-enter-active, .@{className}-appear {
.motion-common();
.motion-common(@time);
animation-play-state: paused;
}
.@{className}-leave-active {
.motion-common();
.motion-common(@time);
animation-play-state: paused;
}
.@{className}-enter-active, .@{className}-appear {
@ -29,4 +29,4 @@
.collapse-transition {
transition: @transition-time height ease-in-out, @transition-time padding-top ease-in-out, @transition-time padding-bottom ease-in-out;
}
}

View file

@ -198,6 +198,7 @@
// Animation
@animation-time : .3s;
@animation-time-quick : .15s;
@transition-time : .2s;
@ease-in-out : ease-in-out;