@ffx0s/fx
v1.0.2
Published
DOM FX
Downloads
1
Readme
Fx
一个基于 Web,给 DOM 添加特效的小玩具。
安装
npm install @ffx0s/fx -S
使用
<div id="box" style="width:300px;height:300px;background:pink;"></div>
import Fx from 'fx'
const fx = new Fx.Broken(document.getElementById('box'))
// const fx = new Fx.Hidden(document.getElementById('box'))
fx.animate()
通过 CDN 引入
<script src="https://cdn.jsdelivr.net/npm/@ffx0s/fx/dist/fx.min.js"></script>
<div id="box" style="width:300px;height:300px;background:pink;"></div>
<script>
var fx = new Fx.Broken(document.getElementById('box'))
// var fx = new Fx.Hidden(document.getElementById('box'))
fx.animate()
</script>