18种基于anime.js的文字动画特效

您所在的位置:网站首页 js动画效果代码案例 18种基于anime.js的文字动画特效

18种基于anime.js的文字动画特效

#18种基于anime.js的文字动画特效| 来源: 网络整理| 查看: 265

这是一款基于anime.js的文字动画特效。这些文字效果是通过前后导航按钮切换文字时,制作不同的文字动画特效。

使用方法

下面是其中一种文字动画特效的GIF动态图片演示效果:

文字动画特效

制作这组文字动画特效的js代码类似下面的样子:

// Initialize var txt = new TextFx(this.el.querySelector('.title')); // Show letters: // txt.show([effect] [,callback]); // If nothing is passed, then there's no animation. // ´effect´ can either be one of the predefined effects: ['fx1',...,'fx17'] or // an object literal representing both, in and out animations (anime.js based). // Example: effect = { in: { duration: 500, delay: function(el, index) { return 250+index*40; }, easing: 'easeOutExpo', opacity: 1, translateY: ['50%','0%'] }, out: { duration: 500, delay: function(el, index) { return index*40; }, easing: 'easeOutExpo', opacity: 0, translateY: '-50%' } } // ´callback´ is the callback function, after all the letters finished the animation. // Hide letters: // txt.hide([effect] [,callback]); (same logic of show)

关于anime.js更详细的用法,可以参考它的说明文档。

该文字动画特效的原文地址为:http://tympanus.net/codrops/2016/10/18/inspiration-for-letter-effects/



【本文地址】


今日新闻


推荐新闻


CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3