在Vue中使用wowjs以及遇到的问题

在Vue中使用wowjs以及遇到的问题

下载:

  • npm
npm install wowjs

animate.min.css下载地址:https://www.dowebok.com/131.html
下载完成后得到下面的文件夹↓
在Vue中使用wowjs以及遇到的问题

在main.js中引入:

import Wow from 'wowjs'
import './css/animate.min.css'

Vue.prototype.$wow=Wow

这里需要单另copy并引入animate.min.css
否则wowjs不会生效

接下来在需要wowjs动画效果的div上更改相应的class名即可生效

<template>
  <div class="wow slideInLeft" data-wow-delay="1.5s"></div>
</template>

<script>
export default {
  data() {
    return {};
  },
  mounted() {
    new this.$wow.WOW().init();
  },
};
</script>
上一篇:NameNode、DataNode和MapReduce运行原理


下一篇:用户调查报告