CSS3轉換函數定義 Morf.js
Morf.js 提供了一組 JavaScript 方法用于加速 CSS3 的各種轉換效果,支持的方法都在上圖中,無需編寫 CSS3 代碼。
示例代碼:
// Get a reference to the element var elem = document.getElementById('elem'); var trans = Morf.transition(elem, { // New CSS state '-webkit-transform': 'translate3d(300px, 0, 0) rotate(90deg)', 'background-color': '#FF0000' }, { duration: '1500ms', timingFunction: 'bounce', callback: function (elem) { // You can optionally add a callback option for when the animation completes. } });項目地址: https://github.com/joelambert/morf
本文由用戶 fmms 自行上傳分享,僅供網友學習交流。所有權歸原作者,若您的權利被侵害,請聯系管理員。
轉載本站原創文章,請注明出處,并保留原始鏈接、圖片水印。
本站是一個以用戶分享為主的開源技術平臺,歡迎各類分享!