【问题标题】:Wowjs and Animate.css is not working with VUEJSWowjs 和 Animate.css 不适用于 VUEJS
【发布时间】:2021-07-17 16:19:50
【问题描述】:

我正在尝试使用 wowjs 或 animate.css 包含一些动画,但它似乎不起作用。 以下是我采取的步骤。

第一个:

npm install wowjs

在 main.js 中

import 'animate.css';

在我想使用动画的页面中

<b-container id = "container">
    <b-row style = "margin-top: 100px;" class = "animated fadeInUp">
    ....
    </b-row>
<b-container>

在我想使用 wowjs 的页面中

<template>
    <b-container id = "container">
        <b-row style = "margin-top: 100px;" class = "wow fadeInUp">
            ....
        </b-row>
    <b-container>
<template>

<script>
    import {WOW} from 'wowjs';
    export default {
        mounted() {
            new WOW().init();
        },

    }
</script>

我在这里做错了什么吗?根本没有动画出现。 感谢任何帮助!

【问题讨论】:

    标签: vue.js vuejs2 twitter-bootstrap-3 animate.css wow.js


    【解决方案1】:

    对于 vue,您需要拥有最新的 vue-cli (4.5.12) 和 animate.css (4.1.1) 版本才能运行。

    您可能希望直接导入它们并通过 CDN 加载它们。

    对于 wowjs 试试,(npm install wow.js) 代替。您可以在此处查看参考资料:

    https://github.com/animate-css/animate.css/issues/993

    https://github.com/matthieua/WOW/issues/252

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2021-11-07
      • 2014-09-01
      • 2017-12-01
      • 2016-03-07
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-01-08
      相关资源
      最近更新 更多