这是一款简单的jQuery文字动画特效插件。该插件通过js代码来修改文字的位置和透明度,来实现简单的文字显示动画效果。
使用方法
在页面中引入style.css和jquery.min.js、textyle.min.js文件。
<link rel="stylesheet" href="css/style.css">
<script src="js/jquery.min.js"></script>
<script src="js/textyle.min.js"></script>
HTML结构
在页面中创建一些简单的文字。
<p class="ex1">TEXTYLE</p>
初始化插件
在页面DOM元素加载完毕之后,通过下面的方法来初始化该插件。
$('target').textyle();
配置参数
该jQuery文字动画特效插件的可用配置参数有:
$('target').textyle({
duration : 400,
delay : 100,
easing : 'swing',
callback : null
});
可以通过jquery.easing.js插件来使用easing缓动效果。
$('target').textyle({
duration : 600,
delay : 150,
easing : 'linear',
callback : function(){
$(this).css({
color : 'coral',
transition : '1s',
});
}
});
该简单的jQuery文字动画特效插件的github网址为:https://github.com/mycreatesite/Textyle.js