https://animate.style/ 官网链接

安装
使用 npm 安装:

$ npm install animate.css --save

或者使用 Yarn 安装(这只适用于 Webpack、Parcel 等适当的工具。如果您不使用任何工具来打包或捆绑您的代码,您可以简单地使用下面的 CDN 方法):

$ yarn add animate.css 

将其导入您的文件(可以在main.js中引入,或者在组件中使用):

import 'animate.css';

或者使用 CDN 将其直接添加到您的网页:

<head>
  <link
    rel="stylesheet"
    href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.min.css"
  />
</head>

基本用法

安装 Animate.css 后,将类animate__animated与任何动画名称一起添加到元素(不要忘记animate__前缀!):

<h1 class="animate__animated animate__bounce">An animated element</h1>
posted on 2022-08-28 10:16  最贵不过坚持  阅读(306)  评论(0)    收藏  举报