计算机网络/计算机科学与应用/系统/运维/开发

Vue-过渡动画2

vue过渡动画2


<style>

  .bounce-enter-active{
    animation:bounce-in .5s;
  }
  
  .bounce-leave-active{
      animation: bounce-in .5s reverse;
  }
  
  @keyframes bounce-in{
    0%{
      transform: scale(0);
    }
    50%{
      transform: scale(1.5);
    }
    100%{
      transform: scale(1);
    }
  }
  
</style>

<button @click="show = !show">放大缩小动画</button>
<transition name="bounce">
  <p v-show="show">uniapp</p>
</transition>

<script>
    var vm = new Vue({
        el:'#app',
        data:   {
            show:true
        },
        methods:{
        }
    });
</script>


vue 过渡动画

人生活在得失之间,得亦是失,失亦是得。

评论

^