| 内容 |
1、将以下代码加入heml的<head></head>之间: <style> <!-- #glowtext{ filter:glow(color=red,strength=2); width:100%; } --> </style> <script language=javascript1.2> function glowit(which){ if (document.all.glowtext[which].filters[0].strength==2) document.all.glowtext[which].filters[0].strength=1 else document.all.glowtext[which].filters[0].strength=2 } function glowit2(which){ if (document.all.glowtext.filters[0].strength==2) document.all.glowtext.filters[0].strength=1 else document.all.glowtext.filters[0].strength=2 } function startglowing(){ if (document.all.glowtext&&glowtext.length){ for (i=0;i<glowtext.length;i++) eval('setinterval(glowit('+i+'),150)') } else if (glowtext) setinterval(glowit2(0),150) } if (document.all) window.onload=startglowing </script> 2、将以下代码加入到heml的<body></body>之间[适当的位置]: <span id=glowtext>这里是要显示的文字</span> 3、[可选项]改变文字颜色和背景色可以得到不同的效果。文字颜色修改,只要修改filter:glow(color=red,strength=2); 中的color项,strength为颜色的深度值 。
|