當前位置:編程學習大全網 - 網站源碼 - javascript特效字體怎麽套用進html

javascript特效字體怎麽套用進html

不知道妳所期待的效果是怎樣的,以下是改寫後套樣的代碼。

這裏是給 tu-text 加了壹個ID aa,如果妳是必須針對class,那自己增加壹個for循環吧

Phrase?=?document.getElementById('aa');

Nb?=?Phrase.children.length;

Taille?=?40;

Midx?=?100;

Decal?=?0.5;

y?=?-10000;

Alpha=5;

I_Alpha=0.05;

function?Alors(){?

?Alpha=Alpha-I_Alpha;

?for?(x=0;x<Nb;x++){?

?Alphal=Alpha+Decal*x;?

?Cosine=Math.abs(Math.cos(Alphal));

?ob=Phrase.children[x];

?ob.style.zIndex=Math.round(20*Cosine);

?ob.style.fontSize=Taille+25*Cosine+"px";

?ob.style.color="rgb("+?(27+Math.round(Cosine*80)+50)?+?","+?(127+Math.round(Cosine*80)+50)?+?",0)";

?}

}

Time=window.setInterval("Alors()",10);

  • 上一篇:Android 的幾種加密方式
  • 下一篇:有建站的源代碼壓縮包 想上傳到網站上 虛擬主機顯示解壓失敗
  • copyright 2024編程學習大全網