Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

vue2.0上做切换过渡时,发现切换显示正常,切换消失时有延时没有过渡效果

<transition name='fade'>
        <div v-show="isShow" class="detail" >
            
        </div>
        </transition>
.detail
            position fixed
            z-index 100
            top 0
            left 0
            width 100%
            height 100%
            overflow auto
            background rgba(7,17,27,.8)
            &.fade-enter-active,&.fade-leave-active
                transition opacity 3s
            &.fade-enter,&fade-leave-active
                opacity 0

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
378 views
Welcome To Ask or Share your Answers For Others

1 Answer

能用animate.css 就用, 不要自己去造轮子。 直接 <transition enter-active-class="animated fadeIn" leave-active-clss="animated fadeOut"></transition>


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...