テキストを左にスクロールします。 jsコードeffect_javascriptスキル

WBOY
リリース: 2016-05-16 17:25:31
オリジナル
1391 人が閲覧しました

复制代代码如下:



滚アニメーション文字效果

< script type="text/javascript">
var tc;
window.onload=function(){
var o=document.getElementById('infozone');hscroll(o);
window.setInterval(function(){window.clearTimeout(tc);o.firstChild.style.marginLeft='0px';scrollup(o,20,0);},10000);
}
関数スクロールアップ(o,d,c){
if(d==c){
var t=o.firstChild.cloneNode(true);
o.removeChild(o.firstChild);o.appendChild( t);
t.style.marginTop=o.firstChild.style.marginTop='0px';
hscroll(o);
}
else{
ch=false;var s =3,c=c s,l=(c>=d?c-d:0);
o.firstChild.style.marginTop=-c l 'px';
window.setTimeout(function(){scrollup( o,d,c-l)},50);
}
}

function hscroll(o){
var w1=o.firstChild.offsetWidth,w2=o.offsetWidth;
if(w1<=w2)return;
tc=window.setTimeout(function( ){hs(o,w1-w2,0,w1-w2)},3500);
}

function hs(o,d,c,p){
c ;var t=(c>0?-c:c);o.firstChild.style.marginLeft=t 'px';
if(c==d){if(d==0){tc=window.setTimeout(function(){hs(o,p,0,p)},2500);}else tc=window.setTimeout(function) (){hs(o,0,-p,p)},3500);}
else tc=window.setTimeout(function(){hs(o,d,c,p)},5);
}


C# マウス标标标标示マウス标指能针、マウス标左右键機能相互换、更换マウスマークは鋸形状、Windows を使用したマウスマークの設置パネルなど、小技巧、多益善。



関連ラベル:
ソース:php.cn
このウェブサイトの声明
この記事の内容はネチズンが自主的に寄稿したものであり、著作権は原著者に帰属します。このサイトは、それに相当する法的責任を負いません。盗作または侵害の疑いのあるコンテンツを見つけた場合は、admin@php.cn までご連絡ください。
最新の問題
人気のチュートリアル
詳細>
最新のダウンロード
詳細>
ウェブエフェクト
公式サイト
サイト素材
フロントエンドテンプレート
私たちについて 免責事項 Sitemap
PHP中国語ウェブサイト:福祉オンライン PHP トレーニング,PHP 学習者の迅速な成長を支援します!