animation帧动画
依旧是在style中的class中使用样式,不过animation只在-active中就能完成这个功能:
<style scoped>
.sk-enter-active{
animation: bounce 1s ease
}
.sk-leave-active{
animation: bounce 1s ease reverse
}
@keyframes bounce {
0%{
transform: scale(0);
}
50%{
transform: scale(1.2);
}
100%{
transform: scale(1);
}
}
</style>