恋雾迷尘论坛's Archiver

冰点℃深蓝 发表于 2004-4-6 20:10

[分享]下雨了(代码)

document.write("<layer name=\"dot"+ i +"\" left=\"1\" ");
document.write("top=\"1\" visibility=\"show\"><font color=\"red\">");
document.write(",</font></layer>");
}
else {
document.write("<layer name=\"dot"+ i +"\" left=\"1\" ");
document.write("top=\"1\" visibility=\"show\"><font color=\"red\">");
document.write(",</font></layer>");
   }
}
else
if (ie4up) {
if (i == 0) {
document.write("<div id=\"dot"+ i +"\" style=\"POSITION: ");
document.write("absolute; Z-INDEX: "+ i +"; VISIBILITY: ");
document.write("visible; TOP: 15px; LEFT: 15px;\"><font color=\"red\">");
document.write(",</font></div>");
}
else {
document.write("<div id=\"dot"+ i +"\" style=\"POSITION: ");
document.write("absolute; Z-INDEX: "+ i +"; VISIBILITY: ");
document.write("visible; TOP: 15px; LEFT: 15px;\"><font color=\"red\">");
document.write(",</font></div>");
      }
   }
}
function initRain() {
a = 6;
r = 1;
sn = Math.sin(a);
cs = Math.cos(a);
cx = Math.random() * doc_width + 1;
cy = Math.random() * doc_height + 1;
x = r * sn + cx;
y = cy;
}
function makeRain() {
r = 1;
cx = Math.random() * doc_width + 1;
cy = 1;
x = r * sn + cx;
y = r * cs + cy;
}
function updateRain() {
r += s;
x = r * sn + cx;
y = r * cs + cy;
}
function raindropNS() {
for (i = 0; i < no; ++ i) {
updateRain();
if ((x <= 1) || (x >= (doc_width - 20)) || (y >= (doc_height - 20))) {
makeRain();
doc_width = self.innerWidth;
doc_height = self.innerHeight;
}
document.layers["dot"+i].top = y;
document.layers["dot"+i].left = x;
}
setTimeout("raindropNS()", speed);
}
function raindropIE() {
for (i = 0; i < no; ++ i) {
updateRain();
if ((x <= 1) || (x >= (doc_width - 20)) || (y >= (doc_height - 20))) {
makeRain();
doc_width = document.body.clientWidth;
doc_height = document.body.clientHeight;
}
document.all["dot"+i].style.pixelTop = y;
document.all["dot"+i].style.pixelLeft = x;
}
setTimeout("raindropIE()", speed);
}
if (ns4up) {
raindropNS();
}
else
if (ie4up) {
raindropIE();
}
<!-- 此特效使用可怜的孩子编辑制作-->
<!-- 心情论坛:[url]http://bbs.520235.com--[/url]>;
</SCRIPT>
</body>

叶在北 发表于 2004-4-7 17:09

不全呀

叶在北 发表于 2004-4-7 17:10

你这个在什么地方找的不全
我再去找找
把地址给我

FISH 发表于 2004-4-23 03:31

请把Smilies代码改改,因为有相同地方,所以代码显示不完整

zero 发表于 2004-4-28 14:54

试试怎么样~~~~~~~~~~~``

叶在北 发表于 2004-4-29 15:32

是和论坛打:)显示的关系

孤胆英雄 发表于 2004-5-19 00:16

*** 作者被禁止或删除 内容自动屏蔽 ***

jzhack 发表于 2007-2-4 22:32

支持下!!呵呵~~~

半仙大人 发表于 2007-2-23 11:36

OK..收下

小孩子 发表于 2007-3-3 20:36

怎么看不懂啊?有用吗?

页: [1]

Powered by Discuz! Archiver 6.1.0  © 2001-2007 Comsenz Inc.