日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 前端技术 > CSS >内容正文

CSS

html5文字飞入插件,jquery使用CSS3实现文字动画效果插件Textillate.js

發布時間:2024/9/27 CSS 48 豆豆
生活随笔 收集整理的這篇文章主要介紹了 html5文字飞入插件,jquery使用CSS3实现文字动画效果插件Textillate.js 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

jquery使用CSS3實現文字動畫效果插件Textillate.js

Textillate是一款基于CSS3動畫效果的?JavaScript?庫,您可非常輕輕松地把這些動畫效果應該于網頁中的任何文字。

使用方法

引入核心文件

構建html標簽

My Title

寫入JS,初始化

$(function?()?{

$('.tlt').textillate();

})

以上代碼使用了默認的動畫效果,如果你想改變動理效果,可以在html中調用data API

Title

你也可以在初始化時使用參數來改變

$('.tlt').textillate({ in: { effect: 'rollIn' } });

當然,你也可以用Textillate給一個列表的文字都具有動畫

  • Some?Title
  • Another?Title

$('.tlt').textillate();

注意:你可以通過調用data api配置動畫參數來控制每個li的動畫效果。

參數選項

$('.tlt').textillate({

//?the?default?selector?to?use?when?detecting?multiple?texts?to?animate

selector:?'.texts',

//?enable?looping

loop:?false,

//?sets?the?minimum?display?time?for?each?text?before?it?is?replaced

minDisplayTime:?2000,

//?sets?the?initial?delay?before?starting?the?animation

//?(note?that?depending?on?the?in?effect?you?may?need?to?manually?apply

//?visibility:?hidden?to?the?element?before?running?this?plugin)

initialDelay:?0,

//?set?whether?or?not?to?automatically?start?animating

autoStart:?true,

//?custom?set?of?'in'?effects.?This?effects?whether?or?not?the

//?character?is?shown/hidden?before?or?after?an?animation

inEffects:?[],

//?custom?set?of?'out'?effects

outEffects:?[?'hinge'?],

//?in?animation?settings

in:?{

//?set?the?effect?name

effect:?'fadeInLeftBig',

//?set?the?delay?factor?applied?to?each?consecutive?character

delayScale:?1.5,

//?set?the?delay?between?each?character

delay:?50,

//?set?to?true?to?animate?all?the?characters?at?the?same?time

sync:?false,

//?randomize?the?character?sequence

//?(note?that?shuffle?doesn't?make?sense?with?sync?=?true)

shuffle:?false,

//?reverse?the?character?sequence

//?(note?that?reverse?doesn't?make?sense?with?sync?=?true)

reverse:?false,

//?callback?that?executes?once?the?animation?has?finished

callback:?function?()?{}

},

//?out?animation?settings.

out:?{

effect:?'hinge',

delayScale:?1.5,

delay:?50,

sync:?false,

shuffle:?false,

reverse:?false,

callback:?function?()?{}

},

//?callback?that?executes?once?textillate?has?finished

callback:?function?()?{}});

事件

start.tlt?– textillate開始時觸發

inAnimationBegin.tlt?– 動畫進入開始時觸發

inAnimationEnd.tlt?– 動畫進入結束時觸發

outAnimationBegin.tlt?– ?動畫退出開始時觸發

outAnimationEnd.tlt?– 動畫退出結束時觸發

end.tlt?– ttextillate結束觸發

方法

$element.textillate(‘start’)?– 手動開始或重啟 textillate

$element.textillate(‘stop’)?– 手動暫?;蛲V?textillate

$element.textillate(‘in’)?– 當前文字動畫進入時觸發

$element.textillate(‘out’)?– 當前文字動畫退出時觸發

總結

以上是生活随笔為你收集整理的html5文字飞入插件,jquery使用CSS3实现文字动画效果插件Textillate.js的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。