Home > Web Front-end > JS Tutorial > body text

Create neon text code and special effects based on JavaScript_javascript skills

WBOY
Release: 2016-05-16 15:41:15
Original
1531 people have browsed it

Example 1:

The screenshot of the running effect is as follows:

The specific code is as follows:

http-equiv="Content-Type" content="text/html; charset=gb2312">
Copy after login

Neon Light

var Tname="欢迎您的到来!";
var Tlen=Tname.length;
document.write(""+Tname+"");
var col=new Array("#FFCC00","#3333FF","#FFCC00","#FF0000","#FFCC00","#CC33FF");
var ic=0;
function Dcolor(){
 var Strname="";
 for (i=0;iTlen;++i){
 var Strname=Strname+"+col[ic]+">"+Tname.substring(i,i+1)+"";
 ic=ic+1;
 if (ic==col.length) ic=0;
 }
 a.innerHTML=Strname;
 setTimeout("Dcolor()",200);
}
Dcolor();
 class="style5">
Copy after login

Example 2:

The rendering is as follows:

Demo effect Source code download

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template