不用导入animate库,也能实现animate的动画

1、基础公共代码

css 复制代码
.animated {
  animation-duration: .8s; // 持续时间
  animation-fill-mode: both;
}

2、 在animate官网(Animate.css | A cross-browser library of CSS animations.)找到自己需要的css效果,复制名字,例如:bounce

3、到github上找源码(https://github.com/animate-css/animate.css

4、把源码拷贝下来复制到自己项目代码的css中

注意:如果 不生效,很有可能你没有把公共的基础代码(animated)加进去

参看文献:Animate.css动画库,简单的使用,以及源码剖析_animate动画代码_Unknowncheats的博客-CSDN博客

相关推荐
今日无bug17 分钟前
从「拿来主义」到「亲手造轮子」:2 种 MCP 文件服务器写法对比
前端·node.js·mcp
xcyxiner18 分钟前
flutter 运行到模拟器上
android·前端·flutter
用户9210802628618 分钟前
从 COT 到 ThoughtChain:AI 应用为什么需要展示“思考过程”
前端
Y0011123618 分钟前
springboot+vue项目实战
vue.js·spring boot·后端
天真小巫19 分钟前
2026.8.23总结
前端·html
PedroQue9919 分钟前
RouterLink v2.5.0:H5端原生能力全面回归
前端·uni-app
八角丶21 分钟前
Node.js 异步上下文详解(实验驱动)
前端·node.js
用户21816970493024 分钟前
Flutter (二十五)视频播放
前端
半个落月24 分钟前
在浏览器里运行 DeepSeek-R1:推理、流式输出与停止生成(二)
前端·人工智能·react.js
绿岛之北26 分钟前
Electron 安全第四章: Preload 与 IPC
前端·electron