设为首页 | 加入收藏
当前位置:首页>>网页特效>>网页文字特效>> 火烧字特效

火烧字特效

时间:2005-1-14 22:56:22 来源:本站收集整理 作者:佚名

第一步:把如下代码加入<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>

第二步:把如下代码加入<body>区域中

<div align="center"><span id="glowtext"><font size="5" face="汉鼎简长美黑" color="#FFFF66">效果文字</font></span>
</div>


使用方法:
按照源代码中所说的方法,将第一段代码加入到<head>区域内,将第二段代码加入到<body>区域内,然后,可以在其他网页编辑软件中修改发光的文字(大小、字体等) 。另外,还可以在 filter:glow(color=red,strength=2);中修改火焰的颜色(将red换为green等)。