网页动态图形显示特效[网页特效]

王朝html/css/js·作者佚名  2006-11-24
窄屏简体版  字體: |||超大  

<!-- website:http://www.webjx.com -->

<!-- bbs:http://bbs.webjx.com -->

<!-- 完整的HTML代码如下 -->

<html>

<head>

<title>网页教学网动态页面展示网页特效</title>

<meta name="Author" content="from at http://www.webjx.com">

<meta http-equiv="imagetoolbar" content="no">

<style type="text/css">

body {cursor:crosshair;margin:0; padding:0; position:absolute; overflow:hidden; background:#000; left:0; top:0; width:100%; height:100%;zIndex:-2;}

.bar {border:#000 solid 1px;position:absolute;font-size:1px;}

</style>

<script type="text/javascript"><!--

// =======================================================

// http://www.webjx.com

// =======================================================

window.onerror = new Function("return true");

document.onselectstart = new Function("return false");

screen.bufferDepth = 16;

xm = 0;

ym = 0;

nx = 0;

ny = 0;

nx2 = 0;

ny2 = 0;

K = 0;

k = 0;

cx = 0;

cy = 0;

/////////

N1 = 20;

N2 = 2;

/////////

function run(){

cx+=Math.round((xm-cx) * .1);

cy+=Math.round((ym-cy) * .1);

k = 0;

K+= .1;

for(i=1; i<=N1; i++){

z = 2.01 + i - (K%2) - ((i%2)?1:2);

F = 5 / z;

d = 1 + nx / 10 * F;

c = Math.round(128 * F);

for(j=-N2; j<N2; j++){

p = (nx * .25 + ((i%2)?cy:cx) + (nx2 * j)) * F;

with(document.getElementById("SF").getElementsByTagName("span")[k++].style){

if(i%2){

T = Math.round(ny2 + p - d * .5);

if(T+d>=0 && T<ny){

left = 0;

width = nx;

top = T;

height = Math.round(d);

background = "RGB("+0+","+c+","+0+")";

zIndex = Math.round(F * 100);

} else top = ny;

} else {

T = Math.round(nx2 + p - d * .5);

if(T+d>=0 && T<nx){

left = T;

width = Math.round(d);

top = 0;

height = ny;

background = "RGB("+0+","+c+","+0+")";

zIndex = Math.round(F * 100);

} else left = nx;

}

}

}

}

setTimeout("run()", 16);

}

document.onmousemove = function(e){

if (window.event) e = window.event;

xm = -(e.x || e.clientX) + nx2;

ym = -(e.y || e.clientY) + ny2;

}

function resize(){

nx = document.body.offsetWidth;

ny = document.body.offsetHeight;

nx2 = nx / 2;

ny2 = ny / 2;

}

onresize = resize;

onload = function() {

resize();

for(i=1; i<=N1; i++){

for(j=-N2; j<N2; j++){

o = document.createElement("span");

o.className="bar";

document.getElementById("SF").appendChild(o);

}

}

run();

}

//-->

</script>

</head>

<body>

<div id="SF" style="position:absolute;left:0;top:0"></div>

</body>

</html>

[Ctrl+A 全部选择 提示:你可先修改部分代码,再按运行]

 
 
 
免责声明:本文为网络用户发布,其观点仅代表作者个人观点,与本站无关,本站仅提供信息存储服务。文中陈述内容未经本站证实,其真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
 
 
© 2005- 王朝網路 版權所有 導航