美文网首页
webpack中使用wowjs和animate.css

webpack中使用wowjs和animate.css

作者: zgjx | 来源:发表于2017-11-19 23:11 被阅读0次

animate.css 是一个来自国外的 CSS3 动画库,它预设了抖动(shake)、闪烁(flash)、弹跳(bounce)、翻转(flip)、旋转(rotateIn/rotateOut)、淡入淡出(fadeIn/fadeOut)等多达 60 多种动画效果,几乎包含了所有常见的动画效果。
官网:https://daneden.github.io/animate.css
github:https://github.com/daneden/animate.css

WOW.js可以在页面向下滚动的过程中播放这些动画效果,还可以为动画设置喜欢的风格、延迟、长度、偏移和迭代等。
官网:http://mynameismatthieu.com/WOW
github:https://github.com/matthieua/WOW

在webpack中使用也很简单,按如下步骤操作即可:
1.首先使用npm安装wowjs
npm install wowjs --save-dev
animate.css会自动安装。
2.在js文件中添加如下代码

import 'animate.css'
import {WOW} from 'wowjs';
new WOW({live: false}).init();

如果不添加live: false,控制台会提示:MutationObserver is not supported by your browser. & WOW.js cannot detect dom mutations, please call .sync() after loading new content.

参考:
1.https://stackoverflow.com/questions/35099440/wow-js-with-webpack-and-react
2.https://github.com/matthieua/WOW/issues/234

相关文章

  • webpack中使用wowjs和animate.css

    animate.css 是一个来自国外的 CSS3 动画库,它预设了抖动(shake)、闪烁(flash)、弹跳(...

  • vue中使用wow.js动画效果

    1、通过npm安装wowjs和animate.css 这里有个坑 直接这样安装 animate版本太高 没有效果,...

  • 在vue-cli 中使用wowjs

    在vue-cli 中使用wowjs 使用node导入依赖 在要使用的页面导入文件 初始化wowjs 问题:控制台可...

  • Vue+Wowjs动画演示

    场景 前端同事使用vue开发网页,并需要使用wowjs进行动画效果展示。但wowjs并未生效,找不到原因。 解决 ...

  • 在Vue中使用Animate.css库

    在Vue中如何使用keyframs的动画 2.Vue中使用Animate.css库使用animate[https:...

  • Vue中使用animate.css

    使用animate.css必须使用vue的 enter-active-class 和 leave-active-...

  • animate.css的使用方法

    animate.css介绍 animate.css是一个跨浏览器的css3动画库 animate.css基础使用 ...

  • VUE之动画特效

    1. 在vue使用animate.css库 安装:npm install animate.css --save引用...

  • css 中使用webpack别名(alias)

    webpack css中使用别名(alias)和node_modules中的文件 在webpack中配置的别名(a...

  • webpack起步二

    使用webpack配置文件(webpack.config.js) 在 webpack 4 中,可以无须任何配置使用...

网友评论

      本文标题:webpack中使用wowjs和animate.css

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