动画库 Animate.css | GreenSock(gsap)

一、Animate.css

Animate.css 是一个准备好的、跨平台的动画库。(强调、主页、滑动、注意力引导等)

样式地址:https://animate.style/

1. 安装

npm install animate.css

2. 引入(main.js)

import “animate.css”

3. 使用

3.1 结合 transition 组件使用

动画库 Animate.css | GreenSock(gsap)

动画库 Animate.css | GreenSock(gsap)

3.2 自定义过渡class

手动添加:animate__animated+需要展示的动画

动画库 Animate.css | GreenSock(gsap)

二、GreenSock(gsap)

通过JavaScript为CSS属性、SVG、Canvas等设置动画,并且是浏览器兼容的。

1. 安装

npm install gsap

2. 引入

import gsap from “gsap”

3. 使用

· before-enter

· enter

· after-enter

· enter-cancelled

· before-leave

· leave

· after-leave

· leave-cancelled

动画库 Animate.css | GreenSock(gsap)

动画库 Animate.css | GreenSock(gsap)

© 版权声明
THE END
如果内容对您有所帮助,就支持一下吧!
点赞0 分享
评论 抢沙发

请登录后发表评论

    暂无评论内容