js文字特效制作js文字閃爍與文字變色效果


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>js文字特效制作js文字閃爍與文字變色效果</title>
<meta name="description" content="js文字特效制作一個js文字閃爍效果,文字間隙顏色變化紅、黃、藍閃爍過程。內含js代碼下載。" />
</head>

<body>

<a id="actext" href="http://www.jsfoot.com"><b>js文字閃爍</b></a>

<script type="text/javascript">
var i = 0;

function getColor(){
 i++;
 switch(i){
  case 1:return "#ff0000";
  case 2:return "#ff6600";
  case 3:return "#3366cc";
  default:return "black";
 }
}

function colorful(){
 var o =document.getElementById('actext');
 o.style.color=getColor();
 if(i==3)i=0;
 setTimeout('colorful()',1000);
}

colorful();

</script>

</body>

</html>


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM