不用导入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博客

相关推荐
IT_陈寒2 小时前
JavaScript项目实战经验分享
前端·人工智能·后端
用户47949283569153 小时前
6w star,GitHub 趋势第一的 Ponytail,这个agent插件到底在火什么
前端·后端
薛定喵的谔4 小时前
我开源了一个精致的 Next.js 博客模板:Skyplume
前端·前端框架·next.js
张龙6875 小时前
构建生产级 AI Agent:工具调用与记忆架构实战指南
前端
kyriewen5 小时前
2026 年了,还在用 Node.js?Bun 迁移实战:20 分钟搞定,附踩坑记录
前端·javascript·node.js
青山Coding7 小时前
Cesium应用(八):物体运动的实现思路
前端·cesium
用户41659673693557 小时前
Android WebView 加载 file:// 离线页面调试教程
android·前端
Asmewill7 小时前
curl命令学习笔记一
前端
我是一只快乐的小螃蟹7 小时前
1.2 ArrayList 源码解析
前端
星栈7 小时前
我用 Rust + Dioxus 做了个全栈跨平台笔记应用:再把新建、编辑和交付补上
前端·rust·前端框架