查看此帖的完整版本:炽热的文字特殊效果:(适用于IE4++)阅读 3770 次

作者:dmacro 2003/9/30 9:53:21

炽热的文字特殊效果:(适用于IE4++)
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为颜色的深度值 。


分页:[1]