@ffx0s/fx

DOM FX

Usage no npm install needed!

<script type="module">
  import ffx0sFx from 'https://cdn.skypack.dev/@ffx0s/fx';
</script>

README

Fx

一个基于 Web,给 DOM 添加特效的小玩具。

Demo

安装

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>