Scrollbarfarben ändern:
<STYLE>BODY { scrollbar-face-color: red; SCROLLBAR-TRACK-COLOR: blue; scrollbar-arrow-color: black; scrollbar-base-color: #ffff33; scrollbar-shadow-color : #33cc99; SCROLLBAR-3DLIGHT-COLOR: #ff33ff; SCROLLBAR-DARKSHADOW-COLOR: #33ffff; scrollbar-highlight-color: white; } </STYLE>
Scrollbar wechselt beim bewegen die Farbe:
<SCRIPT language="JScript"> <!-- var scrollPct, prevStep, nextStep, interStep steps = new Array(); steps[0] = new Array(128,128,128); steps[1] = new Array(255,0,0); steps[2] = new Array(255,255,0); steps[3] = new Array(0,255,0); steps[4] = new Array(0,255,255); steps[5] = new Array(0,0,255); steps[6] = new Array(255,0,255); steps[7] = new Array(255,0,0); steps[8] = new Array(255,255,255); function newColor(chan) { var i=Math.floor(steps[prevStep][chan]+interStep*(steps[nextStep][chan]-steps[prevStep][chan])); return i; } function scrollFunk() { scrollPct=(steps.length-1)*document.body.scrollTop/(document.body.scrollHeight-document.body.clientHeight); prevStep=Math.floor(scrollPct); nextStep=Math.ceil(scrollPct); interStep=scrollPct-prevStep; var newRGB="rgb("+newColor(0)+","+newColor(1)+","+newColor(2)+")"; var invRGB="rgb("+(255-newColor(0))+","+(255-newColor(1))+","+(255-newColor(2))+")"; if (document.body.style.scrollbarTrackColor != null) { document.body.style.scrollbarFaceColor=newRGB; document.body.style.scrollbarTrackColor=invRGB; } } window.onscroll=scrollFunk; file://--> </SCRIPT>
Scrollbar wechselt ständig die Farbe:
<html> <body bgcolor=#000000 text=#ffffff link=#ccff88 vlink=ccff88 alink=#ccff88> <script> // (C) 2000 by CodeLifter.com // http://www.codelifter.com // Free for all users, but leave in this header // blink speed in miliseconds var rate = 333; // true to start automatically, else false var DoIt = true // the three blink colors var Color1 = "#FF0000" var Color2 = "#00FF00" var Color3 = "#0000FF" // the color if/when turned off var ColorX = "#C0C0C0" var i = 0; function doTriStateRainbow(){ if (document.all){ if (DoIt){ i++; if (i==1) C = Color1 if (i==2) C = Color2 if (i==3) C = Color3 document.body.style.scrollbarBaseColor = C if (i>2) i=0; timer=setTimeout('doTriStateRainbow()', rate) }else{ document.body.style.scrollbarBaseColor = ColorX } } } </script> <body onload="doTriStateRainbow()"> Blinkende Scroll-Leiste aus und an schalten<BR> <a href="#" onClick="DoIt=false">AUS</a> / <a href="#" onClick="DoIt=true;doTriStateRainbow()">AN</a> <BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR> </body></html>
zurück