animate.css是一款前端动画库,相似的有velocity-animate

用法:

首先

  1. npm install animate.css --save

然后在vue文件的script中引入:

  1. import $ from '../assets/js/jquery.js';//非必要
  2. import animate from 'animate.css'

最后绑定元素使用:

  1. <template>
  2. <div class="song">
  3. <p id="f" @click='fade'>hello</p>
  4. </div>
  5. </template>
  1. methods:{
  2. fade:function(){
  3. $('#f').addClass('animated bounceOutLeft')
  4. }
  5. }

部分api:

  1. fade: {
  2. title: '淡入淡出',
  3. fadeIn: '淡入',
  4. fadeInDown: '向下淡入',
  5. fadeInDownBig: '向下快速淡入',
  6. fadeInLeft: '向右淡入',
  7. fadeInLeftBig: '向右快速淡入',
  8. fadeInRight: '向左淡入',
  9. fadeInRightBig: '向左快速淡入',
  10. fadeInUp: '向上淡入',
  11. fadeInUpBig: '向上快速淡入',
  12. fadeOut: '淡出',
  13. fadeOutDown: '向下淡出',
  14. fadeOutDownBig: '向下快速淡出',
  15. fadeOutLeft: '向左淡出',
  16. fadeOutLeftBig: '向左快速淡出',
  17. adeOutRight: '向右淡出',
  18. fadeOutRightBig: '向右快速淡出',
  19. fadeOutUp: '向上淡出',
  20. fadeOutUpBig: '向上快速淡出'
  21. },
  22. bounce: {
  23. title: '弹跳类',
  24. bounceIn: '弹跳进入',
  25. bounceInDown: '向下弹跳进入',
  26. bounceInLeft: '向右弹跳进入',
  27. bounceInRight: '向左弹跳进入',
  28. bounceInUp: '向上弹跳进入',
  29. bounceOut: '弹跳退出',
  30. bounceOutDown: '向下弹跳退出',
  31. bounceOutLeft: '向左弹跳退出',
  32. bounceOutRight: '向右弹跳退出',
  33. bounceOutUp: '向上弹跳退出'
  34. },
  35. zoom: {
  36. title: '缩放类',
  37. zoomIn: '放大进入',
  38. zoomInDown: '向下放大进入',
  39. zoomInLeft: '向右放大进入',
  40. zoomInRight: '向左放大进入',
  41. zoomInUp: '向上放大进入',
  42. zoomOut: '缩小退出',
  43. zoomOutDown: '向下缩小退出',
  44. zoomOutLeft: '向左缩小退出',
  45. zoomOutRight: '向右缩小退出',
  46. zoomOutUp: '向上缩小退出'
  47. },
  48. rotate: {
  49. title: '旋转类',
  50. rotateIn: '顺时针旋转进入',
  51. rotateInDownLeft: '从左往下旋入',
  52. rotateInDownRight: '从右往下旋入',
  53. rotateInUpLeft: '从左往上旋入',
  54. rotateInUpRight: '从右往上旋入',
  55. rotateOut: '顺时针旋转退出',
  56. rotateOutDownLeft: '向左下旋出',
  57. rotateOutDownRight: '向右下旋出',
  58. rotateOutUpLeft: '向左上旋出',
  59. rotateOutUpRight: '向右上旋出'
  60. },
  61. flip: {
  62. title: '翻转类',
  63. flipInX: '水平翻转进入',
  64. flipInY: '垂直翻转进入',
  65. flipOutX: '水平翻转退出',
  66. flipOutY: '垂直翻转退出'
  67. },
  68. strong: {
  69. title: '强调类',
  70. bounce: '弹跳',
  71. flash: '闪烁',
  72. pulse: '脉冲',
  73. rubberBand: '橡皮筋',
  74. shake: '左右弱晃动',
  75. swing: '上下摆动',
  76. tada: '缩放摆动',
  77. wobble: '左右强晃动',
  78. jello: '拉伸抖动'
  79. }

参考https://segmentfault.com/a/1190000009245134

https://github.com/daneden/animate.css

在vue中使用animate.css的更多相关文章

  1. vue中使用animate.css

    一:使用animate.css的使用 1.安装npm install animate.css --save 2.在main.js中引入import animate from 'animate.css' ...

  2. vue中使用animate.css动画库

    1.安装: npm install animate.css --save 2.引入及使用: //main.js中 import animated from 'animate.css' Vue.use( ...

  3. 048——VUE中使用animate.css动画库控制vue.js过渡效果

    <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...

  4. vue中使用animate.css实现动画

    参考链接:https://www.cnblogs.com/ccyinghua/p/7872694.html 参考链接:https://www.jianshu.com/p/2e0b2f8d40cf 使用 ...

  5. vue项目中引入animate.css和wow.js

    本文转自:https://blog.csdn.net/liyunkun888/article/details/85003152 https://www.zhuimengzhu.com/content/ ...

  6. vue+ webpack中的animate.css实现的执行多个连续的动画

    1.安装 npm install animate.css 2.使用方法 入口文件App中进行引入 import animate from 'animate.css' 3.多个连续的动画 实现的效果:实 ...

  7. vue 动画框架Animate.css @keyframes

    <script src="vue.js"></script> <link rel="stylesheet" href=" ...

  8. vue过渡和animate.css结合使用

    <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...

  9. 在vue中使用animate库

    <style> @keyframes bounce-in { 0% { transform: scale(0); } 50% { transform: scale(1.5) } 100% ...

随机推荐

  1. WEB前端开发流程总结

    作者声明:本博客中所写的文章,都是博主自学过程的笔记,参考了很多的学习资料,学习资料和笔记会注明出处,所有的内容都以交流学习为主.有不正确的地方,欢迎批评指正 WEB前端开发项目流程总结 1.新建项目 ...

  2. 大前端全栈CSS3移动端开发

    作者声明:本博客中所写的文章,都是博主自学过程的笔记,参考了很多的学习资料,学习资料和笔记会注明出处,所有的内容都以交流学习为主.有不正确的地方,欢迎批评指正 本节课学习视频来源:https://ww ...

  3. 使用PYTHON解析Wireshark的PCAP文件

    PYTHON首先要安装scapy模块 PY3的安装scapy-python3,使用PIP安装就好了,注意,PY3无法使用pyinstaller打包文件,PY2正常 PY2的安装scapy,比较麻烦 f ...

  4. Scrum立会报告+燃尽图(十一月二十三日总第三十一次):界面修改及新页面添加

    此作业要求参见:https://edu.cnblogs.com/campus/nenu/2018fall/homework/2410 项目地址:https://git.coding.net/zhang ...

  5. 机器学习实战第二章----KNN

    tile的使用方法 tile(A,n)的功能是把A数组重复n次(可以在列方向,也可以在行方向) argsort()函数 argsort()函数返回的是数组中值从大到小的索引值 dict.get()函数 ...

  6. Numpy and Pandas

    安装 视频链接:https://morvanzhou.github.io/tutorials/data-manipulation/np-pd/ pip install numpy pip instal ...

  7. Mac下使用svn命令

    Mac系统自带svn命令,能够很方便的同步更新代码,使用方法: 1.导入项目svn import /Users/username/Desktop/Project1 svn://192.168.1.12 ...

  8. linux的一些机制Signal, Fork,

    signal(SIGCHLD, SignalHandler); 注册软中断,对应的api close(socket); ret=fork(): 父进程,返回子进程的pid. 子进程返回0, 出错返回& ...

  9. js滚动异步加载数据的思路

    <body> <div style="width:200px; height:1000px; border:1px solid red;" id="to ...

  10. form 表单提交类型

    multipart/form-data与x-www-form-urlencoded区别 multipart/form-data:既可以上传文件等二进制数据,也可以上传表单键值对,只是最后会转化为一条信 ...