The automatic DIV scrolling function and the color modification of the scroll bar, and the color of the div scrolling scroll bar
1. Automatic DIV scrolling
<Script type = "text/javascript">
Function startmarquee (lh, speed, delay ){
Var t;
Var oHeight = 300;/** div height **/
Var p = false;
Var o = document. getElementById ("show ");
Var preTop = 0;
O. scrollTop = 0;
Function start (){
T = setInterval (scrolling, speed );
O. scrollTop + = 1;
}
Function scrolling (){
If (o. scrollTop % lh! = 0
& O. scrollTop % (o. scrollHeight-oHeight-1 )! = 0 ){
PreTop = o. scrollTop;
O. scrollTop + = 1;
If (preTop> = o. scrollHeight | preTop = o. scrollTop ){
O. scrollTop = 0;
}
} Else {
ClearInterval (t );
SetTimeout (start, delay );
}
}
SetTimeout (start, delay );
}
Window. onload = function (){
/** Startmarquee (one rolling height, speed, stay time );**/
Startmarquee (20, 40, 50 );
}
</Script>
<Div id = "show" style = "height: 600px; width: 100%; overflow-y: scroll; scrollbar-base-color: # ffffff; SCROLLBAR-HIGHLIGHT-COLOR: # ffffff; SCROLLBAR-ARROW-COLOR: # ffffff; overflow-x: none; "> </div>
2. scroll bar color
Scrollbar-3d-light-color set or retrieve the highlighted border color of the scroll bar
Crollbar-highlight-color to set or retrieve the ThreedHighlight color of the 3D interface of the scroll bar
Scrollbar-face-color set or retrieve the color of the 3D surface (ThreedFace) of the scroll bar
Scrollbar-arrow-color to set or retrieve the color of the arrow in the scroll bar direction
Scrollbar-shadow-color to set or retrieve the ThreedShadow color of the 3D interface of the scroll bar
Scrollbar-dark-shadow-color to set or retrieve the ThreedDarkShadow color
Scrollbar-base-color to set or retrieve the base color of the scroll bar.
Note: This information is taken from the network.