Flippant.js :讓頁面內容產生翻轉的迷你js+css庫

jopen 11年前發布 | 25K 次閱讀 前端技術 Flippant.js

Flippant.js一個讓頁面內容產生翻轉的迷你js+css庫。沒有依賴任何JS框架。

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.

// invoke the close event on the back element when it's time to close.

// 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)</pre>

項目主頁:http://www.baiduhome.net/lib/view/home/1371543165328

 本文由用戶 jopen 自行上傳分享,僅供網友學習交流。所有權歸原作者,若您的權利被侵害,請聯系管理員。
 轉載本站原創文章,請注明出處,并保留原始鏈接、圖片水印。
 本站是一個以用戶分享為主的開源技術平臺,歡迎各類分享!