【文件属性】:
文件名称:scroll-animation:根据滚动位置对元素进行动画处理
文件大小:9KB
文件格式:ZIP
更新时间:2021-04-28 15:45:01
parallax animation scroll translate3d animate
滚动动画
根据滚动位置对元素进行动画处理。 受和启发。
哦,不,为什么还要另一个视差脚本? 我们真的需要吗?
我找不到适合我需要的npm软件包:
动画任何DOM属性的能力
使用进行表演
暂时挂起以最大程度地减少负载
没有data-属性或特殊标签
正在安装
npm install scroll-animation
用法
const animate = require ( 'scroll-animation' )
const el = document . querySelector ( '#el' )
const animateEl = ( percentage ) => {
const opacity = ( 1 - percentage * .6 ) . toFixed ( 2 )
el . style . opacity = 'scale(' + scale + ')'
}
【文件预览】:
scroll-animation-master
----.gitignore(84B)
----license.md(727B)
----docs()
--------bundle.js(6KB)
--------demo.js(527B)
--------index.html(5KB)
----package.json(1KB)
----dist()
--------.gitkeep(0B)
----readme.md(2KB)
----index.js(1KB)
----.travis.yml(111B)
----.editorconfig(293B)