当前位置: 电脑软硬件应用网 > 设计学院 > 网页特效 > 正文
鼠标发光的效果
鼠标发光的效果
2005-12-30 18:53:59  文/45IT收集   出处:电脑软硬件应用网   

新建一个HTML文件,找到<BODY>标记,把它修改为

<body id="mybody" style=filter:light(enabled=1);"> 

下一步是把下面的代码插入到代码编辑窗口就OK了~: 

<script language="vbscript"> 
dim red,gre,blu 
dim x,y,z 
red=255 
gre=255 
blu=255 
sub window_onload() 
mybody.style.cursor="hand" 
y=window.event.y+30 
call mybody.filters.light.addpoint(0,0,z,red,gre,blu,100) 
end sub 
sub document_onmousemove() 
x=window.event.x 
y=window.event.y 
call mybody.filters.light.movelight(0,x,y,30,1) 
end sub 
</script> 

好了,如果你想把光源设置的宽一点,可以将" call mybody.filters.light.movelight(0,x,y,30,1)" 里的30改大一点就可以了,<BODY>里的标记是为了把网页设置为一片漆黑,好了就是这点道理了.

  • 上一篇文章:

  • 下一篇文章:
  • 最新热点 最新推荐 相关文章
    网页特效代码:仿京东的商品分类导航…
    不能屏蔽的网页右下角窗口特效
    装载页面进度条代码
    链接特效之js做引用文章链接代码
    左右移动转换文字特效HTML代码解析
    网页页面实现自动刷新的3种代码
    网页特效代码:纯css下拉菜单列表
    JS特效代码:实现间歇无缝文字滚动特…
    文字滚动特效(兼容多浏览器)
    网页特效代码:JavaScript显示系统时…
    关于45IT | About 45IT | 联系方式 | 版权声明 | 网站导航 |

    Copyright © 2003-2011 45IT. All Rights Reserved 浙ICP备09049068号