[查看演示] 源码如下 ---------------------------------------------------------- <html>
<head>
<title>Untitled-www.51windows.Net</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<body bgcolor="Black">
<div id="myLightObject" style="position: relative; height: 400px; width: 400px; top: 10px; left: 0px; color: White; filter: light;font-size:12px">
<p>
黑夜给了我一双眼睛,<br>
而我却用它来寻找光明,<br>
园林晴昼春谁主<br>
暖律潜催,幽谷暄和,黄鹂翩翩,乍迁芳树
<p>
春花秋月何时了,往事知多少<br>
小楼昨夜又东风<br>
故国不堪回首月明中。<br>
雕栏玉砌应犹在,只是朱颜改。
</p>
<p>
问君能有几多愁,<br>
恰似一江春水向东流。<br>
CSS滤镜与VBScript结合运用的效果<br>
利用CSS的Light滤镜模拟移动的光锥<br>
</p>
用VBScript捕捉鼠标的移动,令光锥射向也跟着移动
</p>
</div>
<script language="VBScript">
Option Explicit
sub window_OnLoad()
call myLightObject.filters.light(0).addambient(0,0,255,30)
call myLightObject.filters.light(0).addcone(400,400,200,100,100,200,204,200,80,10)
end sub
sub document_onMouseMove()
call myLightObject.filters.light(0).MoveLight(1,window.event.x,window.event.y,0,1)
end sub
</script>
</body>
</html>
<div style="position: absolute; top: 10; right: 10; width: 148; height: 18;cursor:hand">
<input type="button" name="Button" value="查看源代码" onClick= 'window.location = "view-source:" + window.location.href'></div> |