燈光效果
文章導(dǎo)讀:
<html>
<head>
<title>燈光效果</title>
<style type="text/css">
<!--
img.light{
filter:light;
border:none;
}
-->
</style>
</head>
<body>
<script language="javascript">
// 調(diào)用設(shè)置光源函數(shù)
window.onload=setlights1;
// 調(diào)用Light濾鏡方法
function setlights1(){
var iX2=lightsy.offsetWidth; //獲得圖片寬度
var iY2=lightsy.offsetHeight; //獲得圖片高度
lightsy.filters[0].addCone(0,0,5,iX2,iY2,60,130,255,50,20);
lightsy.filters[0].addCone(0,iY2,5,iX2,0,60,130,255,50,20);
//lightsy.filters[0].addcone(430,120,10,100,100,255,255,0,70,55);
}
</script>
<img src="fish.jpg">
<img id="lightsy" src="fish.jpg" class="light">
</body>