美文网首页前端
vue为v-if添加过渡动画效果

vue为v-if添加过渡动画效果

作者: 秀萝卜 | 来源:发表于2022-01-27 15:49 被阅读0次

    https://blog.csdn.net/qq_41948178/article/details/103901722

    <transition name="plus-icon">
       <div class="service" @click="qq()" v-if='go_qq'>
           <img src="~@/../static/img/service.png" alt="">
       </div>
    </transition>
    
    .plus-icon-enter-active {
        transition: opacity 0.5s;
    }
    .plus-icon-enter {
        opacity: 0;
    }
    .plus-icon-leave-active {
        transition: opacity 0.5s;
    }
    .plus-icon-leave-to {
        opacity: 0;
    }
    

    相关文章

      网友评论

        本文标题:vue为v-if添加过渡动画效果

        本文链接:https://www.haomeiwen.com/subject/plsahrtx.html