我的骄傲鬼夫第224:怎样在网页上面制作闪动的字?

来源:百度文库 编辑:中科新闻网 时间:2024/05/10 11:55:52
需不需要脚本

<span id="theText" style="width:100%">
<h1>护灵·奴儿</h1>
</span>

<script>
<!--
var from = 1;
var to = 4;
var delay = 30; //闪的速度
var glowColor = "BLUE";//颜色
var i = to;
var j = 0;
textPulseDown();

function textPulseUp()
{
if (!document.all)
return
if (i < to)
{
theText.style.filter = "Glow(Color=" + glowColor + ", Strength=" + i + ")";
i++;
theTimeout = setTimeout('textPulseUp()',delay);
return 0;
}

if (i = to)
{
theTimeout = setTimeout('textPulseDown()',delay);
return 0;
}

}

function textPulseDown()
{
if (!document.all)
return
if (i > from)
{
theText.style.filter = "Glow(Color=" + glowColor + ", Strength=" + i + ")";
i--;
theTimeout = setTimeout('textPulseDown()',delay);
return 0;
}

if (i = from)
{
theTimeout = setTimeout('textPulseUp()',delay);
return 0;
}
}

//-->
</script>