阿平35
发表于 2010-1-12 15:06
<html>
<head>
<meta http-equiv=\"Content-Type\" content=\"text/html; charset=gb2312\" />
<title>爱的世界</title>
<meta name=\"Author\" content=\"【莺燕音画】\">
<style type=\"text/css\">
body {cursor:crosshair; background:#000; margin:0; padding:0; position:absolute; overflow:hidden; left:0; top:0; width:100%; height:100%;}
</style>
<script type=\"text/javascript\"><!--
var M = new Array();
M= \" 0 1 1 0 0111111 \"
M= \" 0 1 1 0 0 1 \"
M= \" 0 1 1 0 0 1 \"
M= \" 0 1 1 0 0 1 \"
M= \" 0 1 1 0 0 111111 \"
M= \" 0 1 1 0 0 1 \"
M= \" 0 1 1 0 0 1 \"
M= \" 0 1 1 0 0 1 \"
M= \" 0000 1 1 0 111111 \"
var object = new Array();
var nx = 0;
var ny = 0;
var nX = 0;
var nY = 0;
var xm = 0;
var ym = 0;
function CObj(N,img,x1,y1,tmp){
this.img = document.createElement(\"img\");
this.img.src = img.src;
this.img.style.position = \"absolute\";
this.img.style.left = -1000;
document.body.appendChild(this.img);
this.N = N;
this.sx= img.width/2;
this.x0= 0;
this.y0= 0;
this.x1= x1;
this.y1= y1;
this.sto = \"object[\"+N+\"].depl();\"
this.depl = function() {
with (this) {
x = (x1-x0+nX)*.1;
y = (y1-y0+nY)*.1;
if(Math.abs(x+y)>0.0001){
x0 = x0+x;
y0 = y0+y;
img.style.left = x0;
img.style.top= y0;
} else {
x0 = xm-sx;
y0 = ym-sx;
}
setTimeout(sto,30);
}
}
this.start = function() {
with(this) {
x0 = xm-sx;
y0 = ym-sx;
depl();
}
}
setTimeout(\"object[\" + N + \"].start()\",tmp);
}
function resize(){
nx = document.body.offsetWidth;
ny = document.body.offsetHeight;
nX = (nx-(M.length*15))/2;
nY = (ny-(M.length*15))/2;
}
onresize = resize;
onload = function() {
imgsrc = document.getElementById(\"doot\").getElementsByTagName(\"img\");
resize();
xm = nx/2;
ym = ny/2.5;
document.onmousemove = function(e) {
if (window.event) e = window.event;
xm = (e.x || e.clientX);
ym = (e.y || e.clientY);
}
k = 0;
for(i=0; i<M.length; i++){
for(j in M){
c = M.charAt(i);
if(c!=\" \")object = new CObj(k++, imgsrc, i*15, j*15, k*50);
}
}
}
//-->
</script>
</head>
<body>
<div style=\"LEFT: 0px; POSITION: absolute; TOP: 0px\" align=\"left\"><img style=\"FILTER: alpha(opacity=90, finishOpacity=0,style=2)\" src=\"world.jpg\" /></div>
<div id=\"doot\" style=\"display:none\">
<img src=\"boulMP11.gif\">
<img src=\"bouleGris1.gif\">
</div>
</body>
</html>
阿平35
发表于 2010-1-12 15:09
<html>
<head>
<meta http-equiv=\"Content-Type\" content=\"text/html; charset=gb2312\" />
<title>爱的世界</title>
<meta name=\"Author\" content=\"【莺燕音画】\">
<style type=\"text/css\">
body {cursor:crosshair; background:#000; margin:0; padding:0; position:absolute; overflow:hidden; left:0; top:0; width:100%; height:100%;}
</style>
<script type=\"text/javascript\"><!--
var M = new Array();
M= \" 0 1 1 0 0111111 \"
M= \" 0 1 1 0 0 1 \"
M= \" 0 1 1 0 0 1 \"
M= \" 0 1 1 0 0 1 \"
M= \" 0 1 1 0 0 111111 \"
M= \" 0 1 1 0 0 1 \"
M= \" 0 1 1 0 0 1 \"
M= \" 0 1 1 0 0 1 \"
M= \" 0000 1 1 0 111111 \"
var object = new Array();
var nx = 0;
var ny = 0;
var nX = 0;
var nY = 0;
var xm = 0;
var ym = 0;
function CObj(N,img,x1,y1,tmp){
this.img = document.createElement(\"img\");
this.img.src = img.src;
this.img.style.position = \"absolute\";
this.img.style.left = -1000;
document.body.appendChild(this.img);
this.N = N;
this.sx= img.width/2;
this.x0= 0;
this.y0= 0;
this.x1= x1;
this.y1= y1;
this.sto = \"object[\"+N+\"].depl();\"
this.depl = function() {
with (this) {
x = (x1-x0+nX)*.1;
y = (y1-y0+nY)*.1;
if(Math.abs(x+y)>0.0001){
x0 = x0+x;
y0 = y0+y;
img.style.left = x0;
img.style.top= y0;
} else {
x0 = xm-sx;
y0 = ym-sx;
}
setTimeout(sto,30);
}
}
this.start = function() {
with(this) {
x0 = xm-sx;
y0 = ym-sx;
depl();
}
}
setTimeout(\"object[\" + N + \"].start()\",tmp);
}
function resize(){
nx = document.body.offsetWidth;
ny = document.body.offsetHeight;
nX = (nx-(M.length*15))/2;
nY = (ny-(M.length*15))/2;
}
onresize = resize;
onload = function() {
imgsrc = document.getElementById(\"doot\").getElementsByTagName(\"img\");
resize();
xm = nx/2;
ym = ny/2.5;
document.onmousemove = function(e) {
if (window.event) e = window.event;
xm = (e.x || e.clientX);
ym = (e.y || e.clientY);
}
k = 0;
for(i=0; i<M.length; i++){
for(j in M){
c = M.charAt(i);
if(c!=\" \")object = new CObj(k++, imgsrc, i*15, j*15, k*50);
}
}
}
//-->
</script>
</head>
<body>
<div style=\"LEFT: 0px; POSITION: absolute; TOP: 0px\" align=\"left\"><img style=\"FILTER: alpha(opacity=90, finishOpacity=0,style=2)\" src=\"world.jpg\" /></div>
<div id=\"doot\" style=\"display:none\">
<img src=\"boulMP11.gif\">
<img src=\"bouleGris1.gif\">
</div>
</body>
</html>
我本善良
发表于 2010-2-7 17:36
先看看 学习下
weiweisixue
发表于 2010-2-10 08:00
meikanjian!!!!!!!!!!!!!
pnn
发表于 2010-4-7 22:13
= =我还是没看到啊,怎么了
仄仄
发表于 2010-4-17 12:37
好漂亮啊
莺燕音画
发表于 2010-4-20 16:27
楼上朋友复制的代码造成回复页面代码冲突。
飞雪飘飘
发表于 2010-4-20 17:40
谢谢分享。学习了。
刷刷刷1
发表于 2010-4-20 18:26
yao l
麒麟星
发表于 2010-6-1 21:24
学学,谢谢老师
页:
1
2
3
4
5
6
7
8
9
10
[11]
12
13
14
15
16