Otóż chciałbym, żeby napisy były wyświetlane na jakimś tle, np. czarnym.
Po ustawieniu tego
nic się nie zmienia na stronie. Może jest to spowodowane tym, że js jest w sekcji
<BODY BGCOLOR="000000">
?
<HEAD>
Podaję kod skryptu:
<html> <head> <!-- STEP I: Goes between <HEAD> & </HEAD> tags You may keep it, change or ignore it! Or linking to an External Style Sheet: <LINK REL=StyleSheet HREF="yourstyle.css"> without other style tags --> <!-- STEP II: Goes between <HEAD> & </HEAD> tags Or linking to an External js file: <script language="javascript" src="yourfile.js"></script> without other script tags --> <script LANGUAGE="JavaScript"> /*********************************** * This notice may not be removed ***********************************/ //-- Begin Scroller's Parameters and messages --> //scroller's width var swidth=330; //scroller's height var sheight=22; //scroller's speed var sspeed=4; var restart=sspeed; var rspeed=sspeed; //scroller's pause var spause=2400; //scroller's background var sbcolor="white"; var singletext=new Array(); //singletext[...]='...'; //-- end Parameters and message --> //-- begin: Scroller's Algorithm --> var ii=0; function goup(){if(sspeed!=rspeed*8){sspeed=sspeed*2;restart=sspeed;}} function godown(){if(sspeed>rspeed){sspeed=sspeed/2;restart=sspeed;}} function start(){ if(document.getElementById){ns6div=document.getElementById('iens6div');ns6div.style.top=sheight;ns6div.innerHTML=singletext[0];sizeup=ns6div.offs
etHeight;ns6scroll();} else if(document.layers){ns4layer=document.ns4div.document.ns4div1;ns4layer.top=sheight;ns4layer.do
cument.write(singletext[0]);ns4layer.document.close();sizeup=ns4layer.document.height;ns4scroll();} else if(document.all){iediv=iens6div;iediv.style.pixelTop=sheight;iediv.innerHTML=singletext[0];
sizeup=iediv.offsetHeight;iescroll();}} function iescroll(){if(iediv.style.pixelTop>0&&iediv.style.pixelTop<=sspeed){iediv.style.pixelTop=0;setTimeout("iescroll()",spause);}else if(iediv.style.pixelTop>=sizeup*-1){iediv.style.pixelTop-=sspeed;setTimeout("iescroll()",100);}else{if(ii==singletext.length-1)ii=0;else ii++;iediv.style.pixelTop=sheight;iediv.innerHTML=singletext[ii];sizeup=iediv.of
fsetHeight;iescroll();}} function ns4scroll(){if(ns4layer.top>0&&ns4layer.top<=sspeed){ns4layer.top=0;setTimeout("ns4scroll()",spause);}else if(ns4layer.top>=sizeup*-1){ns4layer.top-=sspeed;setTimeout("ns4scroll()",100);}else{if(ii==singletext.length-1)ii=0;else ii++;ns4layer.top=sheight;ns4layer.document.write(singletext[ii]);ns4layer.document.close();sizeup=ns4layer.document.height;ns4scroll();}} function ns6scroll(){if(parseInt(ns6div.style.top)>0&&parseInt(ns6div.style.top)<=sspeed){ns6div.style.top=0;setTimeout("ns6scroll()",spause);}else if(parseInt(ns6div.style.top)>=sizeup*-1){ns6div.style.top=parseInt(ns6div.style.top)-sspeed;setTimeout("ns6scroll()",100);} else{if(ii==singletext.length-1)ii=0;else ii++; ns6div.style.top=sheight;ns6div.innerHTML=singletext[ii];sizeup=ns6div.offsetHei
ght;ns6scroll();}} //-- end Algorithm --> </script> <!-- End of Script between <head> & </head> tags--> </HEAD> <!-- STEP III: Make sure start() is loaded --> <BODY onLoad="start()" BGCOLOR=000000> <!-- STEP IV: Goes between <BODY ... > & </BODY> tags begin: body code --> <!-- You may remove last cell below (<td> ... </td>) to get rid of Speed-change --> </TABLE> if(document.getElementById||document.all){document.write('<div style="position:relative;overflow:hidden;width:'+swidth+';height:'+sheight+';clip:rect(0 '+swidth+' '+sheight+' 0);background-color:'+sbcolor+';" onmouseover="sspeed=0;" onmouseout="sspeed=restart"><div id="iens6div" style="position:relative;width:'+swidth+';"></div></div>');}</script> <!-- end code between body tags -->
Problem w tym, że nie ma czarnego tła, jest ono dla każdej wiadomości, ale to po ustawieniu przy właściwościach singletext. Gdy poszczególne wiadomości się przesuwają, widać biały pasek, tego nie chcę - chciałbym, żeby było tło czarne i tyle.
Da się to zrobić?
Trzebaby w skrypcie coś dopisać pewnie, tylko ja nie wiem, co.