Vue中使用animate.css V4

Vue中使用animate.css V4

最近把公司官网项目依赖进行了升级,里面用到了animate.css。目前版本4.1.0。

目前4.x版本相比之前3.x的breaking change如下:

Animate.css v4 brought some improvements, improved animations, and new animations, which makes it worth upgrading. But it also comes with a breaking change: we have added prefix for all of the Animate.css classes - defaulting to animate__ - so a direct migration is not possible.

But fear not! Although the default build, animate.min.css, brings the animate__ prefix we also provide the animate.compat.css file which brings no prefix at all, like the previous versions (3.x and under).

现总结下animate.css V4版本在Vue中的使用方法。

安装

yarn add animate.css

引入

在main.js中引入

import animate from 'animate.css'

Vue.use(animate)

使用

App.vue






补充

更多高级用法请参考官方文档:https://animate.style/

你可能感兴趣的:(vue,css,vue,animate.css)