1.0.2 • Published 4 years ago

@ffx0s/fx v1.0.2

Weekly downloads
4
License
MIT
Repository
github
Last release
4 years ago

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>