猿问

Vue2.0 过渡问题

v-enter: 
v-enter-active: 
v-leave: 
v-leave-active:

这四个东西到底怎么用

`.fade-enter-active, .fade-leave-active {
transition: opacity .5s
}
.fade-enter, .fade-leave-active {
opacity: 0
}`

希望用白话直接说明


撒科打诨
浏览 661回答 1
1回答

哈士奇WWW

/* enter进入过渡透明度0-1 */.fade-enter{opacity: 0;}.fade-enter-to{opacity: 1;}.fade-enter-active{transition: all .3s ease;}/* leave离开过渡透明度1-0 */.fade-leave{opacity: 1;}.fade-leave-to{opacity: 0;}.fade-leave-active{transition: all .3s ease;}
随时随地看视频慕课网APP

相关分类

JavaScript
我要回答