Cara Membuat Tulisan Efek Neon

ortega | 15.20 |


Cukup unik memang tulisan efek neon ini, dimana bukan tulisannya yang berjalan,tapi warna dari efek tulisan tersebut yang berjalan...ok sob biar gak penasaran, seperti apa sih bentuknya, coba anda lihat dibawah ini contohnya:

Unik bukan?.....dan cara membuatnya juga tidak sulit, Cukup Anda tambahkan kode script dibawah ini.:
<script type='text/javascript'> 
var message="Disini teks pesan anda efek neon"
var neonbasecolor="#DDD"
var neontextcolor="#f00"
var neontextcolor2="#000"
var flashspeed=100      // speed of flashing in milliseconds
var flashingletters=3      // number of letters flashing in neontextcolor
var flashingletters2=1      // number of letters flashing in neontextcolor2 (0 to disable)
var flashpause=0      // the pause between flash-cycles in milliseconds
///No need to edit below this line/////
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(){
//Change all letters to base color
if (n==0){
for (m=0;m<message.length;m++)
crossref(m).style.color=neonbasecolor
}
//cycle through and change individual letters to neon color
crossref(n).style.color=neontextcolor
if (n>flashingletters-1) crossref(n-flashingletters).style.color=neontextcolor2 
if (n>(flashingletters+flashingletters2)-1) crossref(n-flashingletters-flashingletters2).style.color=neonbasecolor
if (n<message.length-1)
n++
else{
n=0
clearInterval(flashing)
setTimeout("beginneon()",flashpause)
return
}
}
function beginneon(){
if (document.all||document.getElementById)
flashing=setInterval("neon()",flashspeed)
}
beginneon()
</script>
Untuk penempatan kodenya terserah Anda....tetapi kalau ingin di postingan seperti biasa harus di mode Edit HTML bukan mode COMPOSE. Ganti teks "Disini teks pesan anda efek neon" sesuai selera Anda.......

Category:

About GalleryBloggerTemplates.com:
GalleryBloggerTemplates.com is Free Blogger Templates Gallery. We provide Blogger templates for free. You can find about tutorials, blogger hacks, SEO optimization, tips and tricks here!