Anonymus: Farbübergang

Beitrag lesen

Hi!

weil man die Farben je nach Bedarf ändern sollte!
Ich weiß nicht ob das überhaupt mit Javascript geht, einfacher wird es allemal mit Flash oder SVG, und bestimmt auch Java!

Grüße
Andreas

Hi!

weil man die Farben je nach Bedarf ändern sollte!
Ich weiß nicht ob das überhaupt mit Javascript geht, einfacher wird es allemal mit Flash oder SVG, und bestimmt auch Java!

Grüße
Andreas

Für Links:<html><head><style>a{width:0px;font-Size:40px;font-Family:impact;}a#n:link{color:#777777;}a#n:visited{color:#abcdef;}a#n:hover{font-weight:bold;color:#ff6600;}a#n:active{font-Size:40px;color:#bbbbbb;}</style><script>var st=2,sv=2,tm=1;var af='rgb(189,129,129)';var ef='#ff0000';var C=[],d=document,dl=d.links,e,ti;with(d){onmouseover=OVER;onmouseout=OUT;};function F(){f=1; for(j=0;j<dl.length;j++) {ra=C[j][0];ga=C[j][1];ba=C[j][2];re=RGB(ef,0);ge=RGB(ef,1);be=RGB(ef,2);  ec=e.currentStyle.color;  if(e==dl[j]){ra=RGB(ec,0);ga=RGB(ec,1);ba=RGB(ec,2);};  if(C[j][4]==1)VG(sv);  if(C[j][4]==2){re=RGB(af,0);ge=RGB(af,1);be=RGB(af,2);VG(st);};  C[j][0]=ra;C[j][1]=ga;C[j][2]=ba;  ra==re&&ga==ge&&ba==be?(C[j][4]=''):f=0;  if(dl[j].id!='n')with(dl[j].style){color='rgb('+ra+','+ga+','+ba+')';fontWeight='normal';} }; f==0?(clearTimeout(ti),ti=setTimeout('F()',tm)):clearTimeout(ti);};function INIT(){for(j=0;j<dl.length;j++) {C[j]=[RGB(af,0),RGB(af,1),RGB(af,2),''];  if(dl[j].id!='n')dl[j].style.color=af; };};function OUT(){TG(2);};function OVER(){e=event.srcElement;TG(1);};function RGB(o,oo){function RGBX(x1,x2){return parseInt(o.match(/#/)?(eval('0x'+o.match(x1)[1]).toString(10)):o.match(x2)[1])}; r=RGBX(/#(..)/,/((\d+)/); g=RGBX(/#..(..)/,/,(\d+)/); b=RGBX(/#....(..)/,/(\d+))/); return oo==0?r:oo==1?g:oo==2?b:'rgb('+r+','+g+','+b+')';};function TG(tg){for(j=0;j<dl.length;j++)if(e==dl[j]){C[j][4]=tg;F(ef);};};function VG(s){if(ra<re){ra+=s;if(ra>=re)ra=re}else if(ra>re){ra-=s;if(ra<=re)ra=re}else{ra=re}; if(ga<ge){ga+=s;if(ga>=ge)ga=ge}else if(ga>ge){ga-=s;if(ga<=ge)ga=ge}else{ga=ge}; if(ba<be){ba+=s;if(ba>=be)ba=be}else if(ba>be){ba-=s;if(ba<=be)ba=be}else{ba=be};};</script></head><body onload='INIT()' bgColor=black><a href='#'>baloba</a><br><a href='#' id=n>balooba</a><br><a href='#' id=n>baloooba</a><br><a href='#'>babaloobab</a><br><a href='#'>babaloobaboo</a></body></html>