精华区 [关闭][返回]

当前位置:网易精华区>>讨论区精华>>网络专区>>● 网站建设>>盖世神功 — 网站建设技术>>HTML — 做好一个网页不能没有的基础>>DHTML特效>>特效20:发光的字符

主题:特效20:发光的字符
发信人: marsz()
整理人: microant(1999-08-02 12:13:18), 站内信件
实例:发光的字符
适用浏览器:IE4+
 
说明:黑暗中几个字符闪闪发光,这可不是用的GIF动画,COOL!!!
 
效果:

发光的字符
WWW.JOYSOFT.NET
 
 


第一步:把以下代码复制到<head>标记中。



<style>
<!--#glowtext{filter:glow(color=FFFF00,strength=3);width:100%;}-->
</style>
<script language="JavaScript1.2">

/*
modified by mars 1999, www.joysoft.net
*/

function glowit(which){
if (document.all.glowtext[which].filters[0].strength==3)
document.all.glowtext[which].filters[0].strength=2
else
document.all.glowtext[which].filters[0].strength=3
}

function glowit2(which){
if (document.all.glowtext.filters[0].strength==3)
document.all.glowtext.filters[0].strength=2
else
document.all.glowtext.filters[0].strength=3
}

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>

第二步:要加入闪烁的字符,请在字符两旁添上代码:<span id="glowtext">,
如:

<span id="glowtext">This is a glowing text</span>

--
________________________________________________
欢迎访问飞翔鸟软体驿站: HTTP://JOYSOFT.SOIM.NET
BEST REGUARDS, MARS         MAILTO:[email protected]

※ 来源:.月光软件站 http://www.moon-soft.com.[FROM: 202.106.176.19]

[关闭][返回]