⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 21.9.htm

📁 使用javascript处理图片特效源码
💻 HTM
字号:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=gb2312">
<title>图像效果</title>
</head>

<body onload=go()>
<h1>图像显示效果</h1><hr>
<SCRIPT language=JavaScript>
<!--
function LoadCookie(Key)
{
var CookieString = document.cookie
var CookieSet = CookieString.split(';')
var SetSize = CookieSet.length
var CookiePieces
var ReturnValue = ""
var x = 0
for (x = 0; ((x < SetSize) && (ReturnValue == "")); x ++)
{
CookiePieces = CookieSet[x].split ('=')
if (CookiePieces[0].substring (0,1) == ' ')
CookiePieces[0] = CookiePieces[0].substring (1, CookiePieces[0].length)
if (CookiePieces[0] == Key)
{
ReturnValue = CookiePieces[1]
break
}
}
return ReturnValue
}

if ("" == LoadCookie("etangWHAD"))
{
document.cookie = "etangWHAD=done; path=/" 
var popV='width='+myWidth+',height='+myHeight+',titlebar=0,toolbar=0,location=0,menubar=0,scrollbars=no,resizable=no';
popV+='scrollbars=0,resizable=0,channelmode=0,directories=0,status=0'; var dz=document;
if(parseFloat(navigator.appVersion)>=4)
{
var myTI=screen.height/2-myHeight/2;
var myLI=screen.width/2-myWidth/2;
popV+=',top='+myTI+',left='+myLI;
}
if(dz.cookie.indexOf('e=llo')<=0)
{
self.focus();
fastClickpopWindow();
dz.cookie='he=llo';
}
function fastClickpopWindow()
{
window.open(myURL,'etangWHAD',popV);
self.focus();
}
}
</SCRIPT>
<SCRIPT>
 <!--
 var Light_X=20
 var Light_Y=20
 var Light_Z=40
 var xInc=10;
 var yInc=10;
 var r=125;
 var deg=0;
 var deg1;
 var rad;
 var conversion=(2*3.1415926)/360
 function movefilt()
 {
 Light_X=r+r*Math.cos(deg*conversion);
 Light_Y=r+r*Math.sin(deg*conversion);
 deg+=10;
 if(deg==360)
 deg=0;
 Body1.filters[0].moveLight(0,Light_X,Light_Y,Light_Z,1);
 mytimeout=setTimeout('movefilt()',100);
 }
 function go(){
 Body1.filters.light.addCone(125,125,0,Light_X,Light_Y,0,255,0,150,20);  Body1.filters.light.addAmbient(0,255,0,30)
 var x=0;
 movefilt();
 }

</SCRIPT>
<IMG height=250 id=Body1 src="3d05.jpg" 
style="FILTER: light(); HEIGHT: 250px; WIDTH: 250px" width=250>
</body>
</html>


⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -