1.下载animate.css

npm install --save-dev animate.css// 注意你使用的源 nrm ls(若没有改变可以忽略)

2.导入animate.css

<link rel="stylesheet" href="../node_modules/animate.css/animate.css">
// 注意你的当前文件和node_moudules文件夹的相对位置

3.动画需要绑定<transition>内

<transition enter-active-class="bounceInRight" leave-active-class="bounceOutRight" :duration="{enter:1000, leave:1200}"><h1 v-show="flag" class="animated"> 这是一个H1</h1>
</transition>// 1. vue中,动画需放在transition里面.
// 2.enter-active-class是入场的动画类,可以通过animate.css官网查看.
// 3.所有动画类必须基于一个animated基类

4.总体代码如下:

<!DOCTYPE html>
<html lang="en"><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta http-equiv="X-UA-Compatible" content="ie=edge"><link rel="stylesheet" href="../node_modules/animate.css/animate.css"></head><body><div id="app"><button @click="flag=!flag">点击</button><transition enter-active-class=" bounceInRight" leave-active-class=" bounceOutRight" :duration="{enter:1000, leave:1200}"><h3 v-show="flag" class="animated">这是一个H3</h3></transition></div><script src="../node_modules/vue/dist/vue.js"></script><script>const app = new Vue({el: '#app',data: {flag: false},methods: {},})</script>
</body></html>

vue --- 使用animate.css实现动画相关推荐

  1. Vue + Element + animate.css 音乐网站(网易云版)

    Vue + Element + animate.css 音乐网站 一.前言 这是小弟的毕业设计,也是第一次用vue框架独立开发网站,现在接入了网易云api,到后面我还会做对应的后端和管理端.因为是第一 ...

  2. Vue使用Animate.css和WOW.js(AOS.js)来实现页面滚动触发动画

    1.安装wowjs(WOW.js – 让页面滚动更有趣_dowebok) 在vue中使用: 首先install: npm install wowjs --save,安装的同时也会安装好animate. ...

  3. Vue CSS3或者npmjs网站中的animate.css实现动画效果

    cartoonvue.vue(CSS3)支持一个动画 <!--动画效果图 利用CSS3动画属性实现--><template><div><h2>动画效果 ...

  4. vue 使用animate.css动画库

    vue 2示例 `先下载` `在 main.js中将Animate.css库导入到您的项目中,即在其中添加如下代码`==(切记两个都要引入 不然没有效果 下面的css是自己封装的动画时间效果之类的)= ...

  5. 前端之vue3使用动画库animate.css(含动画、过渡)

    动画与过渡 一.动画效果 1.默认动画 实例 动画语法 2.给transition指定name 二.过渡效果 三.多个元素过渡 四.vue3使用动画库 动画库animate.css √ 五.总结 一. ...

  6. 怎样控制animate.css的动画时间

    打开 animate.css 第一行 .animated {animation-duration: 1s;animation-fill-mode: both; } animation-duration ...

  7. animate.css 签字动画,使用animate.css完成动画

    animate.css aniamte.css是一个很方便的库,内置了许多常用的动画 和jquery搭配使用比较方便 $.fn.extend({ animateCss: function (anima ...

  8. react使用animate.css完成动画

    1.引入依赖库 cnpm i animate.css cnpm i react-addons-css-transition-group 2.导入模块 import "animate.css& ...

  9. vue使用 animate.css

    1.安装 cnpm install animate.css --save 2.使用 2-1.新建animateCSS.js const animateCSS = (element, animation ...

最新文章

  1. iptables 定义规则
  2. [转载]html5教程
  3. 7-3 模板题 (10 分)(思路+详解)
  4. VC跨进程数据(结构体)传递-WM_COPYDATA
  5. 前端学习(2483):修改文章
  6. 32位python和64位python区别_python32位和64位有什么区别
  7. 这个事关中国人幸福感的问题,能解决吗?
  8. 接口测试实战总结,绝对值得收藏
  9. 好程序员Java教程分享使用HttpClient抓取页面内容
  10. 华为服务器自检信息怎么开,服务器开机自检内存
  11. 数据基础-索引和完整性(约束)
  12. 移动硬盘如何合并磁盘
  13. 通向大数据的巴别塔:这个完整详细的套路是否适合你?
  14. streaing-kafka
  15. CSS / 精灵图+字体图标
  16. js学习笔记(1)什么是JavaScript
  17. 基于vue+springboot的校园疫情健康打卡和离校审批系统的设计 (百度地图API对接)
  18. office365打开服务器文件出错,新安装的Office 365,打开Excel文件时出错,停止工作...
  19. 几行python代码批量对身份证加密
  20. 武汉大学计算机技术VB试题,武汉大学_VB题目

热门文章

  1. mysql json坑_使用mysql innodb 使用5.7的json类型遇到的坑和解决办法
  2. mysql 8核16g参数优化_问个 MySql 优化问题, 16G, 8 核服务器??
  3. cmd管道无法接收特定程序返回值_渗透不会反弹shell?来教你写一个cmd的shell
  4. UnityShader RenderTypeQueue 渲染顺序
  5. Recall(召回率) Precision(准确率) F-Measure E值 sensitivity(灵敏性) specificity(特异性)漏诊率 误诊率 ROC AUC
  6. 苹果电脑基本设置+Linux 命令+Android 实战集锦
  7. 动态内存分配导致内存泄漏之处
  8. 中英翻译(基于百度翻译)
  9. bzoj 1015 并查集
  10. 演练:在组件设计器中创建 Windows 服务应用程序