查看完整版本: 礼花式样的背景

heking520 2008-1-11 02:55

礼花式样的背景

要完成此效果把如下代码加入到<body>区域中
<layer name="a0" left=10 top=10 visibility=show bgcolor="#ffffff" clip="0,0,1,1"></layer>
<layer name="a1" left=10 top=10 visibility=show bgcolor="#fff000" clip="0,0,1,1"></layer>
<layer name="a2" left=10 top=10 visibility=show bgcolor="#ffa000" clip="0,0,1,1"></layer>
<layer name="a3" left=10 top=10 visibility=show bgcolor="#ff00ff" clip="0,0,1,1"></layer>
<layer name="a4" left=10 top=10 visibility=show bgcolor="#00ff00" clip="0,0,1,1"></layer>
<layer name="a5" left=10 top=10 visibility=show bgcolor="#ff00ff" clip="0,0,1,1"></layer>
<layer name="a6" left=10 top=10 visibility=show bgcolor="#ff0000" clip="0,0,1,1"></layer>
<layer name="a7" left=10 top=10 visibility=show bgcolor="#ffffff" clip="0,0,1,1"></layer>
<layer name="a8" left=10 top=10 visibility=show bgcolor="#fff000" clip="0,0,1,1"></layer>
<layer name="a9" left=10 top=10 visibility=show bgcolor="#ffa000" clip="0,0,1,1"></layer>
<layer name="a10" left=10 top=10 visibility=show bgcolor="#ff00ff" clip="0,0,1,1"></layer>
<layer name="a11" left=10 top=10 visibility=show bgcolor="#00ff00" clip="0,0,2,2"></layer>
<layer name="a12" left=10 top=10 visibility=show bgcolor="#0000ff" clip="0,0,2,2"></layer>
<layer name="a13" left=10 top=10 visibility=show bgcolor="#ff0000" clip="0,0,2,2"></layer>
<div id="starsDiv" style="position:absolute;top:0px;left:0px">
<div style="position:relative;width:2px;height:2px;background:#ffffff;font-size:2px"></div>
<div style="position:relative;width:1px;height:1px;background:#fff000;font-size:1px"></div>
<div style="position:relative;width:1px;height:1px;background:#ffa000;font-size:1px"></div>
<div style="position:relative;width:1px;height:1px;background:#ff00ff;font-size:1px"></div>
<div style="position:relative;width:1px;height:1px;background:#00ff00;font-size:1px"></div>
<div style="position:relative;width:1px;height:1px;background:#0000ff;font-size:1px"></div>
<div style="position:relative;width:1px;height:1px;background:#FF0000;font-size:1px"></div>
<div style="position:relative;width:1px;height:1px;background:#ffffff;font-size:1px"></div>
<div style="position:relative;width:1px;height:1px;background:#fff000;font-size:1px"></div>
<div style="position:relative;width:1px;height:1px;background:#ffa000;font-size:1px"></div>
<div style="position:relative;width:1px;height:1px;background:#ff00ff;font-size:1px"></div>
<div style="position:relative;width:2px;height:2px;background:#ff00ff;font-size:2px"></div>
<div style="position:relative;width:1px;height:1px;background:#0000ff;font-size:1px"></div>
<div style="position:relative;width:1px;height:1px;background:#FF0000;font-size:1px"></div>
</div>
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
var Clrs = new Array(9);
Clrs[0] = 'ff0000';
Clrs[1] = '00ff00';
Clrs[2] = '000aff';
Clrs[3] = 'ff00ff';
Clrs[4] = 'ffa500';
Clrs[5] = 'ffff00';
Clrs[6] = '00ff00';
Clrs[7] = 'ffffff';
Clrs[8] = 'fffff0';
var sClrs = new Array(5);
sClrs[0] = 'ffa500';
sClrs[1] = '55ff66';
sClrs[2] = 'AC9DFC';
sClrs[3] = 'fff000';
sClrs[4] = 'fffff0';
var yBase;
var xBase;
var step;
var currStep = 0;
var Xpos = 1;
var Ypos = 1;
var initialStarColor = 'ffa000';
var Mtop = 250;
var Mleft = 250;
function Fireworks() {
if (document.all) {
yBase = window.document.body.offsetHeight / 3;
xBase = window.document.body.offsetWidth / 8;
}
else if (document.layers) {
yBase = window.innerHeight / 3;
xBase = window.innerWidth / 8;
}
if (document.all) {
step = 5;
for ( i = 0 ; i < starsDiv.all.length ; i++ ) {
for (ai = 0; ai < Clrs.length; ai++) {
var c = Math.round(Math.random()*[ai]);
}
if (currStep < 90)
starsDiv.all[i].style.background=initialStarColor;
if (currStep > 90)
starsDiv.all[i].style.background=Clrs[c];
starsDiv.all[i].style.top = Mtop + yBase*Math.sin((currStep+i*5)/3)*Math.sin(550+currStep/100)
starsDiv.all[i].style.left = Mleft + yBase*Math.cos((currStep+i*5)/3)*Math.sin(550+currStep/100)
   }
}
else if (document.layers) {
step = 5;
for ( j = 0 ; j < 24 ; j++ ) { //number of NS layers!
var templayer = "a"+j;
for (ai = 0; ai < Clrs.length; ai++) {
var c = Math.round(Math.random()*[ai]);
}
if (currStep < 90)
document.layers[templayer].bgColor=initialStarColor;
if (currStep > 90)
document.layers[templayer].bgColor=Clrs[c];
document.layers[templayer].top = Mtop +
yBase*Math.sin((currStep+j*5)/3)*Math.sin(550+currStep/100)
document.layers[templayer].left = Mleft +
yBase*Math.cos((currStep+j*5)/3)*Math.sin(550+currStep/100)
   }
}
currStep+= step;
T=setTimeout("Fireworks()",5);
if (currStep == 220) {
currStep = -10;
for (n = 0; n < sClrs.length; n++) {
var k = Math.round(Math.random()*n);
}
initialStarColor = sClrs[k];
if (document.all) {
Dtop = window.document.body.clientHeight - 250;
Dleft = xBase * 3.5;
Mtop = Math.round(Math.random()*Dtop);
Mleft = Math.round(Math.random()*Dleft);
document.all.starsDiv.style.top = Mtop+document.body.scrollTop;
document.all.starsDiv.style.left = Mleft+document.body.scrollLeft;
}
else if (document.layers) {
Dleft = window.innerWidth - 100;
Dtop = window.innerHeight - 100;
Mtop = Math.round(Math.random()*Dtop+window.pageYOffset);
Mleft = Math.round(Math.random()*Dleft+window.pageXOffset);
document.layers[templayer].top = Mtop;
document.layers[templayer].left = Mleft;
}
if ((Mtop < 20) || (Mleft < 20)) {
Mtop += 90;
Mleft += 90;
      }
   }
}
Fireworks();
//  End -->
</script>

cottontuan 2008-1-18 11:11

这还不顶的话太没有道理了。

Chihiro 2008-1-18 11:15

让人看完后ie锁死连瑞星都没法修复只好格式化显示的还是它的好帖?

East_13 2008-1-18 11:18

后面的兄弟和我一起强占高地!

NOX 2008-1-18 11:23

沙发,沙发~~

linxi.竹 2008-1-18 11:29

好帖子,顶一下!

LOST 2008-1-18 11:32

退一步海阔天空,顶一下天高地厚!!

bigblue 2008-2-15 12:34

一人顶贴,全家光荣!!

Bigteeth 2008-2-28 21:51

猪年顶了无数贴,鼠年又来继续顶!!

Bigteeth 2008-2-28 21:51

猪年顶了无数贴,鼠年又来继续顶!!

Bigteeth 2008-3-3 16:43

猪年顶了无数贴,鼠年又来继续顶!!

Bigteeth 2008-3-4 12:14

猪年顶了无数贴,鼠年又来继续顶!!

Bigteeth 2008-3-5 12:30

猪年顶了无数贴,鼠年又来继续顶!!

Bigteeth 2008-3-6 20:11

猪年顶了无数贴,鼠年又来继续顶!!

Bigteeth 2008-3-6 20:11

猪年顶了无数贴,鼠年又来继续顶!!

Bigteeth 2008-3-7 16:39

猪年顶了无数贴,鼠年又来继续顶!!

Bily 2008-3-8 15:05

顶贴不是灌水,顶贴是灌灌水!!

zoezy 2008-3-15 08:46

就得顶这样的帖子嘛~~呵呵~~

zolatemur 2008-3-16 09:33

好帖子!!偶顶!!

zolatemur 2008-3-17 08:37

好帖子!!偶顶!!

zolatemur 2008-3-18 11:36

我和你还没分出高下!我还要再顶一次!!!

zOmbiIEplAy 2008-3-19 12:54

虽然你的贴子已经沉没了!不过,我是你的马甲。

zOmbiIEplAy 2008-3-20 09:14

不用狡辩了!现在不管说什么,都换不回我们对你的景仰,你个发水贴的!!!

panda..love 2008-3-21 11:24

楼主找了多久啊...

Panda.小姐. 2008-3-25 11:37

哈哈,好强啊,怎么也要顶你!

Panda.小姐. 2008-3-25 11:38

哈哈,好强啊,怎么也要顶你!

Panda.小姐. 2008-3-25 11:44

曾经有一个好帖摆在我的面前,我没及时的顶上去

shmily 2008-3-26 06:03

我不是一个随便顶贴的人,不过楼主的帖子我还是要顶的

shoelace 2008-3-27 12:37

子在川上曰:“有贴多好!”

shonen a II代目 2008-3-28 09:19

论坛大了什么贴子都有!

shonen a II代目 2008-3-29 14:06

论坛大了什么贴子都有!

shonen a II代目 2008-3-30 12:20

论坛大了什么贴子都有!

shonen a II代目 2008-3-31 11:59

论坛大了什么贴子都有!

zwlt0811 2008-11-6 16:15

www.bjbtgdst.com

,[url=http://www.bjbtgdst.com.cn/stcc.htm][b]疏通菜池[/b][/url]面向全国,[url=http://www.bjbtgdst.com.cn/stdl.htm][b]疏通地漏[/b][/url]公司创建于1998年度,[url=http://www.bjbtgdst.com.cn/sxsgz.htm][b]上下水改造[/b][/url]由于公司管理体系完善,迅速发展,员工素质高,[url=http://www.bjbtgdst.com.cn/stmt.htm][b]疏通马桶[/b][/url]技术精通,经总公司统一培训,[url=http://www.bjbtgdst.com.cn/sxswx.htm][b]上下水维修[/b][/url]合格上岗.

081006jk 2008-11-7 11:35

中川电气科技有限公司8

精密交流净化稳压电源是我厂根据美国库存珀博士提出的“正弦能量分配”理论,[url=http://www.jonchn.com.cn/two/product.htm][b]稳压器[/b][/url]结合高效宽带滤波网络综合设计而成的高性能新型电子式交流稳压设备。[url=http://www.jonchn.com.cn/two/index.htm][b]稳压电源[/b][/url]它集净化稳压和抗干扰等多种功能于一体,[url=http://www.jonchn.com.cn/two/product.htm][b]稳压器[/b][/url]具有稳压范围宽,响应速度快,稳压精度高等特点,并能有效地抑制黾网各种噪声和尖峰干扰[url=http://www.jonchn.com.cn/two/index.htm][b]稳压电源[/b][/url],是目前交流稳压电源产品中的优选机种,是614系列电子交流稳压电源,[url=http://www.jonchn.com.cn/two/product.htm][b]稳压器[/b][/url]磁饱和稳压电源以及补偿
页: [1]
查看完整版本: 礼花式样的背景
5.12四川大地震