WEB开发网
开发学院网页设计JavaScript js实现字体渐渐消失 阅读

js实现字体渐渐消失

 2008-07-25 19:58:22 来源:WEB开发网   
核心提示:view plaincopy to clipboardPRint?<HTML> <HEAD> <SCRIPT language=javaScript> var col = new Array(); col[15] = '#000000'; col[14] = '
view plaincopy to clipboardPRint?
<HTML>  
<HEAD>  
<SCRIPT language=javaScript>   
var  col  =  new  Array();   
col[15]  =  '#000000';   
col[14]  =  '#111111';   
col[13]  =  '#222222';   
col[12]  =  '#333333';   
col[11]  =  '#444444';   
col[10]  =  '#555555';   
col[9]  =   '#666666';   
col[8]  =   '#777777';   
col[7]  =   '#888888';   
col[6]  =   '#999999';   
col[5]  =   '#AAAAAA';   
col[4]  =   '#BBBBBB';   
col[3]  =   '#CCCCCC';   
col[2]  =   '#DDDDDD';   
col[1]  =   '#EEEEEE';   
col[0]  =   '#FFFFFF';   
var i = col.length; 
var isOut = true;  
function Over()  
{  
if (i>=0 && isOut) {i--;td.style.color=col[i];}  
else if(i<= col.length && !isOut){i++;td.style.color=col[i]; }  
else{isOut = !isOut;}  
setTimeout('Over()',100);//渐变  
}   
  
</SCRIPT>   
  
  
<TABLE><TBODY><TR><TD id=td onmouSEOver=Over()>鼠标放上看效果</TD></TR></TBODY></TABLE> <PRE></PRE> 

Tags:js 实现 字体

编辑录入:爽爽 [复制链接] [打 印]
赞助商链接