文字的跳動

2022-02-01 18:02:59 字數 3656 閱讀 5287

今天做個文字跳動的效果

第一步:引入

第二步引入:

jquery.easing['jswing'] = jquery.easing['swing'];

jquery.extend( jquery.easing,

, easeinquad:

function

(x, t, b, c, d) ,

easeoutquad:

function

(x, t, b, c, d) ,

easeinoutquad:

function

(x, t, b, c, d) ,

easeincubic:

function

(x, t, b, c, d) ,

easeoutcubic:

function

(x, t, b, c, d) ,

easeinoutcubic:

function

(x, t, b, c, d) ,

easeinquart:

function

(x, t, b, c, d) ,

easeoutquart:

function

(x, t, b, c, d) ,

easeinoutquart:

function

(x, t, b, c, d) ,

easeinquint:

function

(x, t, b, c, d) ,

easeoutquint:

function

(x, t, b, c, d) ,

easeinoutquint:

function

(x, t, b, c, d) ,

easeinsine:

function

(x, t, b, c, d) ,

easeoutsine:

function

(x, t, b, c, d) ,

easeinoutsine:

function

(x, t, b, c, d) ,

easeinexpo:

function

(x, t, b, c, d) ,

easeoutexpo:

function

(x, t, b, c, d) ,

easeinoutexpo:

function

(x, t, b, c, d) ,

easeincirc:

function

(x, t, b, c, d) ,

easeoutcirc:

function

(x, t, b, c, d) ,

easeinoutcirc:

function

(x, t, b, c, d) ,

easeinelastic:

function

(x, t, b, c, d)

else

var s = p/(2*math.pi) * math.asin (c/a);

return -(a*math.pow(2,10*(t-=1)) * math.sin( (t*d-s)*(2*math.pi)/p )) + b;

}, easeoutelastic:

function

(x, t, b, c, d)

else

var s = p/(2*math.pi) * math.asin (c/a);

return a*math.pow(2,-10*t) * math.sin( (t*d-s)*(2*math.pi)/p ) + c + b;

}, easeinoutelastic:

function

(x, t, b, c, d)

else

var s = p/(2*math.pi) * math.asin (c/a);

if (t < 1) return -.5*(a*math.pow(2,10*(t-=1)) * math.sin( (t*d-s)*(2*math.pi)/p )) + b;

return a*math.pow(2,-10*(t-=1)) * math.sin( (t*d-s)*(2*math.pi)/p )*.5 + c + b;

}, easeinback:

function

(x, t, b, c, d, s) ,

easeoutback:

function

(x, t, b, c, d, s) ,

easeinoutback:

function

(x, t, b, c, d, s) ,

easeinbounce:

function

(x, t, b, c, d) ,

easeoutbounce:

function

(x, t, b, c, d)

else

if (t < (2/2.75)) else

if (t < (2.5/2.75)) else

},easeinoutbounce:

function

(x, t, b, c, d)

});

第三步:引入

(function

($) ;

var options =$.extend(defaults, options);

console.log(options);

return

this.each(function

() ;

var text =obj.text();

var newmarkup = '';

for (var i = 0; i <= text.length; i++)

obj.html(newmarkup);

if(!options.isauth)) })}

else

, , })}

});}})}

function

beatanimate(el,options)

el.animate(, ,

else}}

})}})}

})(jquery);

第四步:加入關鍵css**

/*

下面兩個是核心樣式

*/.beat-char .rotate

第五步:js指令碼寫法

$(document).ready(function

() );

$('p#rotatetext').beattext();

$('p#autotext').beattext();

$('p#loading').beattext();

$('p#autorotatetext').beattext();

})

第六步:檢視html寫法 下面id名與自己js配置的id相對應

<

p id

="loading"

>正在載入中...

p>

純CSS實現跳動的文字

css start my face webkit keyframes my face 4 68 98 38 6 8 86 10 72 12 64 78 96 14 54 16 18 22 20 36 46 26 50 28 30 40 62 76 88 32 34 66 42 44 70 48 74...

文字抖動 文字特效練習5 跳動的路徑文字和果凍字

文字特效練習5 跳動的路徑文字與果凍字 今天練習跳動的路徑文字以及果凍字的特效,跳動的路徑文字就像幾個調皮的小孩在放學回家的路上跳來跳去,果凍字呢就像果凍一樣彈起的動畫。1 先來製作跳動的路徑文字,新建合成 跳動的文字 新建純色層 跳動路徑 使用鋼筆工具繪製文字路徑 2 選中圖層 跳動路徑 執行選單...

跳動的星星

第一步,設定好介面大小 第二步,設定星星初始位置,和移動速度 第三步,利用迴圈實現移動,設定好什麼時候需要改變速度方向 顏色的話,變不變都無所謂,關鍵是要知道怎麼實現五角星移動和速度的改變 用的vs2019,部分函式可能會不一樣 include include void change char x ...