JS Image Seamless Scrolling script is very easy to use

Source: Internet
Author: User
Tags setinterval

  Best JS image seamless scrolling script, as needed to change the width and number of images can be, the need for friends can refer to the following

Looking for a long time, finally found a suitable, according to need to change the width and number of images can be, with the loop dynamic call database code on OK     code as follows: <! DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 transitional//en" "Http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd ">  <html xmlns=" http://www.w3.org/1999/xhtml ">  <head>  <meta http-equiv=" Content-type "content=" text/html; charset=gb2312 "/>  <title> picture rolling </title>  </head>  <body>  <style Type= "Text/css" >  <!--  #demo {  background: #FFF;  overflow:hidden;  border:1px Dashed #CCC;  width:500px; }  #demo img {  border:3px solid #F2F2F2; }  #indemo {  float: left;  width:800%; }  #demo1 {  float:left; }  #demo2 {  float:left; }  -->  </style>  <div id= "Demo" >  <div id= "Indemo" >  <div id= "Demo1" >   <a href= "#" ><img src= "/jscss/demoimg/wall_s1.jpg" bordEr= "0"/></a>  <a href= "#" ><img src= "/jscss/demoimg/wall_s2.jpg" border= "0"/></a>   <a href= "#" ><img src= "/jscss/demoimg/wall_s3.jpg" border= "0"/></a>  <a "#" > <img src= "/jscss/demoimg/wall_s4.jpg" border= "0"/></a>  <a href= "#" ><img src= "/jscss/ Demoimg/wall_s5.jpg "border=" 0 "/></a>  <a href=" # "><img src="/jscss/demoimg/wall_s6.jpg " Border= "0"/></a>  </div>  <div id= "Demo2" ></div>  </div>  < /div>  <script>  <!--  var speed=10;  var Tab=document.getelementbyid ("demo");  var Tab1=document.getelementbyid ("Demo1");  var Tab2=document.getelementbyid ("Demo2");  tab2.innerhtml= tab1.innerhtml;  function Marquee () {  if (tab2.offsetwidth-tab.scrollleft<=0)   tab.scrollleft-= tab1.offsetwidth  else{  tab.scrollleft++; } }  var mymar=sEtinterval (marquee,speed);  tab.onmouseover=function () {clearinterval (MyMar)};  tab.onmouseout=function () {mymar=setinterval (marquee,speed)}; -->  </script>  </body>  </html>    

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.