以前的使用方法改了,还是看了文档才知道怎么用
官网链接
当然vue有支持的动画,可自行翻越官网

这是在vue-cli项目中直接下载依赖,现在应该没有直接创建一个html文件的吧

控制台:npm install animate.css --save
main.js中:import animated from 'animate.css'Vue.use(animated)

<template>
  <div class="mainbox">
    <transition
      leave-active-class="animate__animated animate__fadeOutLeft"
      enter-active-class="animate__animated animate__fadeInLeft"
      mode="out-in"
    >
      <div class="main">
      </div>
    </transition>
  </div>
</template>

animate__animated,以前是添加animate,现在是animate__animated

animate可以使用@keyframes

.my-element {
  display: inline-block;
  margin: 0 0.5rem;

  animation: bounce; /* referring directly to the animation's @keyframe declaration */
  animation-duration: 2s; /* don't forget to set a duration! */
}
Logo

分享最新的 NVIDIA AI Software 资源以及活动/会议信息,精选收录AI相关技术内容,欢迎大家加入社区并参与讨论。

更多推荐