»
Tiếng AnhTiếng PhápTiếng Việt

In - Chữ cuộn ngang - JavaScriptBank.com

Phiên bản đầy đủ: jsB@nk » Scrollers » Theo chiều ngang » Chữ cuộn ngang
URL: https://www.javascriptbank.com/horizontal-slider-v21.html

Chữ cuộn ngang © JavaScriptBank.comHiệu ứng tạo ra hình ảnhchữ di chuyển">di chuyển trong khung theo hướng từ phải sang trái.

Phiên bản đầy đủ: jsB@nk » Scrollers » Theo chiều ngang » Chữ cuộn ngang
URL: https://www.javascriptbank.com/horizontal-slider-v21.html



CSS
<STYLE type=text/css>.tabc {FONT-WEIGHT: bold; FONT-SIZE: 12px; COLOR: navy; FONT-FAMILY: Arial}.slsh {FONT-WEIGHT: bold; FONT-SIZE: 18px; COLOR: red; FONT-FAMILY: Arial; TEXT-ALIGN: center}</STYLE><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->


JavaScript
<SCRIPT language=javascript>var swidth=310;var sheight=47;var sspeed=2;var resspeed=sspeed;var scolor="#ccffcc";var sborder="2"; var imagef='';preload1 = new Image();preload1.src = "../image/logojs.gif";preload2 = new Image();preload2.src = "../image/logojs.gif";preload3 = new Image();preload3.src = "../image/logojs.gif";var leftimage=new Array();leftimage[0]='<a href="http://JavaScriptBank.com"><img src='+preload1.src+' width=310 height=47 alt="JSBank"></a>';leftimage[1]='<a href="http://JavaScriptBank.com"><img src='+preload2.src+' width=310 height=47 alt="JSBank"></a>';leftimage[2]='<a href="http://JavaScriptBank.com"><img src='+preload3.src+' width=310 height=47 alt="JSBank"></a>';for (mi=0;mi<leftimage.length;mi++)imagef=imagef+leftimage[mi];/************************************* * http://members.rogers.com/bazil/  * * This notice may not be removed.   * *************************************/function start(){if(document.all)firstie(slider);else if(document.getElementById)firstns6(document.getElementById('slider'));else if(document.layers)firstns4(document.slider1.document.slider2);}var operbr=navigator.userAgent.toLowerCase().indexOf('opera');function firstns4(whichdiv){tdivns4=eval(whichdiv);tdivns4.document.write('<nobr>'+imagef+'</nobr>');tdivns4.document.close();thel=tdivns4.document.width;tdivns4.left=swidth;slidens4();}function slidens4(){if(tdivns4.left>=thel*(-1)){tdivns4.left-=sspeed;setTimeout("slidens4()",100);}else{tdivns4.left=swidth;slidens4();}}function firstie(whichdiv){tdivie=eval(whichdiv);tdivie.innerHTML=('<nobr>'+imagef+'</nobr>');thel=tdivie.offsetWidth;tdivie.style.pixelLeft=swidth;slideie();}function slideie(){if(tdivie.style.pixelLeft>=thel*(-1)){tdivie.style.pixelLeft-=sspeed;setTimeout("slideie()",100);}else{tdivie.style.pixelLeft=swidth;slideie();}}function firstns6(whichdiv){tdiv6=eval(whichdiv);tdiv6.innerHTML=('<nobr>'+imagef+'</nobr>');thel=tdiv6.offsetWidth;tdiv6.style.left=swidth;slidens6();}function slidens6(){if(parseInt(tdiv6.style.left)>=thel*(-1)){tdiv6.style.left=parseInt(tdiv6.style.left)-sspeed;setTimeout("slidens6()",100);}else{tdiv6.style.left=swidth;slidens6();}}</SCRIPT><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->


HTML
<BODY onload=start();><DIV class=tabc align=center>Adjust: Speed, Size, Background, Border and Name!</DIV><DIV class=tabc align=center>Pauses while mouse is over. Allows for Hyperlinks.</DIV><SCRIPT language=javascript>document.write('<table border='+sborder+' align="center" bgcolor='+scolor+'><tr><td width='+swidth+'>');if(document.layers)document.write('<span style="borderWidth:0.1px; borderStyle:none; clip:rect(0 '+swidth+' '+sheight+' 0);"><ilayer width='+swidth+' height='+sheight+' name="slider1"><layer class=slsh width='+swidth+' height='+sheight+'>SLIDING SHOW</layer><layer width='+swidth+' height='+sheight+' name="slider2" onMouseover="sspeed=0;" onMouseout="sspeed=resspeed"></layer></ilayer></span>');else{document.write('<div style="position:relative;overflow:hidden;width:'+swidth+';height:'+sheight+';clip:rect(0 '+swidth+' '+sheight+' 0);">');if(operbr==-1)document.write('<div class=slsh style="position:absolute;width:'+swidth+';height:'+sheight+';">SLIDING SHOW</div>');document.write('<div id="slider" style="position:relative;width:'+swidth+';height:'+sheight+';" onMouseover="sspeed=0;" onMouseout="sspeed=resspeed"></div>');if(operbr!=-1)document.write('<div class=slsh style="position:absolute;width:'+swidth+';height:'+sheight+';">SLIDING SHOW</div>');document.write('</div>');}</SCRIPT></TD></TR></TABLE></body><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->