Skip to content

常用动画

渐隐渐显

css
.fade-enter-from,
.fade-leave-to {
  opacity: 0;
}
.fade-leave-from,
.fade-enter-to {
  opacity: 1;
}
.fade-enter-active,
.fade-leave-active {
  transition: all 0.2s;
}

中心缩放

css
.scale-enter-from,
.scale-leave-to {
  transform: scale(0);
}
.scale-leave-from,
.scale-enter-to {
  transform: scale(1);
}
.scale-enter-active,
.scale-leave-active {
  transition: all 0.2s;
}

左右收缩

css
.left-enter-from,
.left-leave-to {
  transform: translate3d(-100%, 0, 0);
}
.left-leave-from,
.left-enter-to {
  transform: translate3d(0, 0, 0);
}
.left-enter-active,
.left-leave-active {
  transition: all 0.2s;
}