vue.js - vue + webpack 中怎么用 animate.css啊
本文介绍了vue.js - vue + webpack 中怎么用 animate.css啊的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
问 题
新手,在学习路由的时候想加个过场动画,下了个animate.css放在static目录下,然后在App.vue中的style标签里@import url('../static/animate.css');
,结果没有报错也没有动画效果,想问问应该怎么用啊,下面是我的代码(路由跳转是对的):
<template>
<div id="app">
<router-view class="animated" transition="bounce"></router-view>
</div>
</template>
<script>
export default {
name: 'app',
components: {
},
transitions: {
bounce: {
enterClass: 'bounceInLeft',
leaveClass: 'bounceOutRight'
}
}
}
</script>
<style>
@import url('../static/animate.css');
#app {
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
text-align: center;
color: #2c3e50;
}
</style>
解决方案
直接用 CDN
放在模版中引入 Animate.css
这篇关于vue.js - vue + webpack 中怎么用 animate.css啊的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文