Jump to content
Hertz

Text Neon

Recommended Posts

Metoda prin care faceti un text sa aiba intensitatea culorii ca un neon.

<h2>
<script language="JavaScript1.2">


var message="Welcome to Romanian Security Center"
var neonbasecolor="gray"
var neontextcolor="yellow"
var flashspeed=100 //in millisecunde


var n=0
if (document.all||document.getElementById){
document.write('<font color="'+neonbasecolor+'">')
for (m=0;m<message.length;m++)
document.write('<span id="neonlight'+m+'">'+message.charAt(m)+'</span>')
document.write('</font>')
}
else
document.write(message)

function crossref(number){
var crossobj=document.all? eval("document.all.neonlight"+number) : document.getElementById("neonlight"+number)
return crossobj
}

function neon(){

if (n==0){
for (m=0;m<message.length;m++)
//eval("document.all.neonlight"+m).style.color=neonbasecolor
crossref(m).style.color=neonbasecolor
}

crossref(n).style.color=neontextcolor

if (n<message.length-1)
n++
else{
n=0
clearInterval(flashing)
setTimeout("beginneon()",1500)
return
}
}

function beginneon(){
if (document.all||document.getElementById)
flashing=setInterval("neon()",flashspeed)
}
beginneon()


</script>
</h2>

Link to comment
Share on other sites

Am si eu o intrebare cum as putea sa fac ca textu ce il pun aici

var message="?"

sa apara in mijloc ? si sa fie pe ceva de genul unei poiezii pe mijloc ... intelegeti ? ca asa in loc de "Welcome to Romanian Security Center" am scirs ceva mai lung si mi-a aparut pana in capat si apoi de la capat ... Sper ca ati inteles ...

Link to comment
Share on other sites

Am si eu o intrebare cum as putea sa fac ca textu ce il pun aici

var message="?"

sa apara in mijloc ? si sa fie pe ceva de genul unei poiezii pe mijloc ... intelegeti ? ca asa in loc de "Welcome to Romanian Security Center" am scirs ceva mai lung si mi-a aparut pana in capat si apoi de la capat ... Sper ca ati inteles ...

Da se poate :D

"<h2 align="left">Aici scrii textul care va fii aliniat la STANGA</h2>

<h2 align="center">Aici scrii textul care va fii aliniat in CENTRU</h2>

<h2 align="right">Aici scrii textul care va fii aliniat la DREAPTA</h2>"

si daca vrei sa fie si in mijloc, pe verticala

folosessti <br> k sa nu scrii nimic in acea linie.

Sper k am fost de folos

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...