Seamless image scrolling and seamless image scrolling

Source: Internet
Author: User

Seamless image scrolling and seamless image scrolling
<Html>
<Head>
<Title> seamless scrolling </title>
<Script type = "text/javascript" src = "jquery-1.7.1.min.js">
</Script> <Body>
<! -- The following is the code for scrolling to the left -->
<Div id = "colee_left" style = "overflow: hidden; width: 730px;">
<Table cellpadding = "0" cellspacing = "0" border = "0">
<Tr>
<Td id = "colee_left1" valign = "top" align = "center">
<Table cellpadding = "2" cellspacing = "0" border = "0">
<Tr align = "center">


<Td style = "padding-right: 15px;"> <br/> <div style =" text-align: center "title =" @ typeName "> Apple Pc </div> </td>
<Td style = "padding-right: 15px;"> <br/> <div style =" text-align: center "title =" @ typeName "> Apple Pc </div> </td>
<Td style = "padding-right: 15px;"> <br/> <div style =" text-align: center "title =" @ typeName "> Apple Pc </div> </td>
<Td style = "padding-right: 15px;"> <br/> <div style =" text-align: center "title =" @ typeName "> Apple Pc </div> </td>
<Td style = "padding-right: 15px;"> <br/> <div style =" text-align: center "title =" @ typeName "> Apple Pc </div> </td>
</Tr>
</Table>
</Td>
<Td id = "colee_left2" valign = "top"> </td>
</Tr>
</Table>
</Div>
<Script type = "text/javascript">
If ($ ("# colee_left1 img"). length> 4 ){
ClearInterval (MyMar3 );
// When using div, ensure that colee_left2 and colee_left1 are on the same line.
Var speed = 30 // The greater the speed, the slower the speed.
Var colee_left2 = document. getElementById ("colee_left2 ");
Var colee_left1 = document. getElementById ("colee_left1 ");
Var colee_left = document. getElementById ("colee_left ");
Colee_left2.innerHTML = colee_left1.innerHTML
Function Marquee3 (){
If (colee_left2.offsetWidth-colee_left.scrollLeft <= 0) // offsetWidth indicates the visible width of the object.
Colee_left.scrollLeft-= colee_left1.offsetWidth // scrollWidth indicates the width of the object's actual content, not the edge width.
Else {
Colee_left.scrollLeft ++
}
}
Var MyMar3 = setInterval (Marquee3, speed)
Colee_left.onmouseover = function () {clearInterval (MyMar3 )}
Colee_left.onmouseout = function () {MyMar3 = setInterval (Marquee3, speed )}
}
</Script>
<! -- Scroll to the left to end the code -->
</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.