Flippant.js 是 DOM 节点上的一个迷你型 UI 库。具有以下特征:
Features:
Flippant 极小,不依赖任何其他而存在
Flippant 易于自定义,只有几个参数和 CSS
Flippant 有一个独特功能: flippant.flip
flippant.flip
代码示例:
var front = document.getElementById('flipthis') , back_content = "<h1>I'm the back!</h1>" // Generate or pull any HTML you want for the back. , back // when the correct action happens, call flip! back = flippant.flip(front, back_content) // this creates the back element, sizes it and flips it around. // call the close method on the back element when it's time to close. back.close() // alternatively you can trigger a close event on the back element if you fancy. var close_event = new CustomEvent('close') back.dispatchEvent(close_event)