Vue cli 使用 animate.css

2019-05-27  本文已影响0人  两年半练习程序员

1.安装

Install via npm:

$ npm install animate.css --save

or yarn:

$ yarn add animate.css

2.引入

main.js中

import Vue from 'vue'
import App from './App.vue'

import animate from 'animate.css'
Vue.use(animate);

new Vue({
  render: h => h(App)
}).$mount('#app')

3.使用

在你想要添加的标签上设置class类

<h1 class="animated infinite bounce delay-2s">Example</h1>

infinite:无限循环
bounce:动画效果 更多动画效果

delay-2s:延迟两秒
...

更多参考

上一篇 下一篇

猜你喜欢

热点阅读