Copy codeThe Code is as follows:
<Html>
<Head>
<Title> scroll text effect </title>
<Style type = "text/css">
# Infozone {font-size: 12px; color: # aa6; overflow: hidden; width: 100px; height: 20px ;}
# Infozone div {height: 20px; line-height: 20px; white-space: nowrap; overflow: hidden ;}
</Style>
<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 );
}
Function scrollup (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 );
}
</Script>
</Head>
<Body>
<Div id = "infozone"> <div> C # source code examples for dynamic operations on mouse Properties, for example, hiding and displaying the mouse pointer, switching the left and right mouse keys, changing the mouse pointer shape, and calling the Windows mouse to set the panel. </Div>
</Body>
</Html> </td>
</Tr>
</Table>