主题:  请教一个问题!谢谢 ̄ ̄

晶儿

职务:普通成员
等级:1
金币:0.0
发贴:10
注册:2001/5/17 11:12:45
#12002/1/31 10:28:43
www.sm185.com/huashi/index.htm

love.lhinfo.ha.cn/index3.htm

请问::这两个网页上的“下心”“下花”是怎么做出来的??源文件是什么?能告诉我么?

先谢谢各位啦 ̄ ̄ ̄

编辑历史:[这消息被晶儿编辑过(编辑时间2002-01-31 10:38:39)]
[这消息被晶儿编辑过(编辑时间2002-01-31 11:04:18)]


晶儿

职务:普通成员
等级:1
金币:0.0
发贴:10
注册:2001/5/17 11:12:45
#22002/1/31 11:09:16
请大家帮帮忙!!!

先谢谢了!!



5D公害

职务:普通成员
等级:9
金币:10.3
发贴:36272
注册:2002/1/13 9:52:57
#32002/1/31 11:10:10
它的页面中有个JS,你可以下下来看看

var no = 15; // snow number
var speed = 10; // smaller number moves the snow faster
var snowflake = "./fly.gif";

var ns4up = (document.layers) ? 1 : 0; // browser sniffer
var ie4up = (document.all) ? 1 : 0;
var dx, xp, yp; // coordinate and position variables
var am, stx, sty; // amplitude and step variables
var i, doc_width = 800, doc_height = 600;
if (ns4up) {
doc_width = self.innerWidth;
doc_height = self.innerHeight;
} else if (ie4up) {
doc_width = document.body.clientWidth;
doc_height = document.body.clientHeight;
}
dx = new Array();
xp = new Array();
yp = new Array();
am = new Array();
stx = new Array();
sty = new Array();
for (i = 0; i < no; ++ i) {
dx[i] = 0; // set coordinate variables
xp[i] = Math.random()*(doc_width-50); // set position variables
yp[i] = Math.random()*doc_height;
am[i] = Math.random()*20; // set amplitude variables
stx[i] = 0.02 + Math.random()/10; // set step variables
sty[i] = 0.7 + Math.random(); // set step variables
if (ns4up) { // set layers
if (i == 0) {
document.write("document.write("top=\"15\" visibility=\"show\">document.write(snowflake + "\" border=\"0\">");
} else {
document.write("document.write("top=\"15\" visibility=\"show\">document.write(snowflake + "\" border=\"0\">");
}
} else if (ie4up) {
if (i == 0) {
document.write("
document.write("absolute; Z-INDEX: "+ i +"; VISIBILITY: ");
document.write("visible; TOP: 15px; LEFT: 15px;\">document.write(snowflake + "\" border=\"0\">
");
} else {
document.write("
document.write("absolute; Z-INDEX: "+ i +"; VISIBILITY: ");
document.write("visible; TOP: 15px; LEFT: 15px;\">document.write(snowflake + "\" border=\"0\">
");
}
}
}
function snowNS() { // Netscape main animation function
for (i = 0; i < no; ++ i) { // iterate for every dot
yp[i] += sty[i];
if (yp[i] > doc_height-50) {
xp[i] = Math.random()*(doc_width-am[i]-30);
yp[i] = 0;
stx[i] = 0.02 + Math.random()/10;
sty[i] = 0.7 + Math.random();
doc_width = self.innerWidth;
doc_height = self.innerHeight;
}
dx[i] += stx[i];
document.layers["dot"+i].top = yp[i];
document.layers["dot"+i].left = xp[i] + am[i]*Math.sin(dx[i]);
}
setTimeout("snowNS()", speed);
}
function snowIE() { // IE main animation function
for (i = 0; i < no; ++ i) { // iterate for every dot
yp[i] += sty[i];
if (yp[i] > doc_height-50) {
xp[i] = Math.random()*(doc_width-am[i]-30);
yp[i] = 0;
stx[i] = 0.02 + Math.random()/10;
sty[i] = 0.7 + Math.random();
doc_width = document.body.clientWidth;
doc_height = document.body.clientHeight;
}
dx[i] += stx[i];
document.all["dot"+i].style.pixelTop = yp[i];
document.all["dot"+i].style.pixelLeft = xp[i] + am[i]*Math.sin(dx[i]);
}
setTimeout("snowIE()", speed);
}
if (ns4up) {
snowNS();
} else if (ie4up) {
snowIE();
}

编辑历史:[这消息被yeah编辑过(编辑时间2002-01-31 11:11:59)]


晶儿

职务:普通成员
等级:1
金币:0.0
发贴:10
注册:2001/5/17 11:12:45
#42002/1/31 11:43:28

我也想在我的网页上放上“下玫瑰花”的源代码,就像这儿 http://love.lhinfo.ha.cn/index3.htm 

一样,玫瑰花飘呀飘呀....

但我不知道该怎么办?怎么做.....



天意 | 5D荣誉斑竹

职务:普通成员
等级:5
金币:10.0
发贴:3467
注册:2001/10/30 16:33:25
#52002/1/31 11:52:00
这里

只要把里面的放雪花的图片文件改玫瑰花儿就可以了。



晶儿

职务:普通成员
等级:1
金币:0.0
发贴:10
注册:2001/5/17 11:12:45
#62002/1/31 16:01:29
谢谢各位

我终于成功啦 ̄ ̄

哈哈 ̄ ̄ ̄ ̄



吃鱼专家

职务:普通成员
等级:6
金币:11.0
发贴:5312
注册:2004/1/17 13:07:16
#72002/1/31 16:23:42
var no = 15; // snow number
var speed = 10; // smaller number moves the snow faster
var snowflake = "./fly.gif";

var ns4up = (document.layers) ? 1 : 0; // browser sniffer
var ie4up = (document.all) ? 1 : 0;
var dx, xp, yp; // coordinate and position variables
var am, stx, sty; // amplitude and step variables
var i, doc_width = 800, doc_height = 600;
if (ns4up) {
doc_width = self.innerWidth;
doc_height = self.innerHeight;
} else if (ie4up) {
doc_width = document.body.clientWidth;
doc_height = document.body.clientHeight;
}
dx = new Array();
xp = new Array();
yp = new Array();
am = new Array();
stx = new Array();
sty = new Array();
for (i = 0; i < no; ++ i) {
dx[i] = 0; // set coordinate variables
xp[i] = Math.random()*(doc_width-50); // set position variables
yp[i] = Math.random()*doc_height;
am[i] = Math.random()*20; // set amplitude variables
stx[i] = 0.02 + Math.random()/10; // set step variables
sty[i] = 0.7 + Math.random(); // set step variables
if (ns4up) { // set layers
if (i == 0) {
document.write("document.write("top=\"15\" visibility=\"show\">document.write(snowflake + "\" border=\"0\">";
} else {
document.write("document.write("top=\"15\" visibility=\"show\">document.write(snowflake + "\" border=\"0\">";
}
} else if (ie4up) {
if (i == 0) {
document.write("
document.write("absolute; Z-INDEX: "+ i +"; VISIBILITY: ";
document.write("visible; TOP: 15px; LEFT: 15px;\">document.write(snowflake + "\" border=\"0\">
";
} else {
document.write("
document.write("absolute; Z-INDEX: "+ i +"; VISIBILITY: ";
document.write("visible; TOP: 15px; LEFT: 15px;\">document.write(snowflake + "\" border=\"0\">
";
}
}
}
function snowNS() { // Netscape main animation function
for (i = 0; i < no; ++ i) { // iterate for every dot
yp[i] += sty[i];
if (yp[i] > doc_height-50) {
xp[i] = Math.random()*(doc_width-am[i]-30);
yp[i] = 0;
stx[i] = 0.02 + Math.random()/10;
sty[i] = 0.7 + Math.random();
doc_width = self.innerWidth;
doc_height = self.innerHeight;
}
dx[i] += stx[i];
document.layers["dot"+i].top = yp[i];
document.layers["dot"+i].left = xp[i] + am[i]*Math.sin(dx[i]);
}
setTimeout("snowNS()", speed);
}
function snowIE() { // IE main animation function
for (i = 0; i < no; ++ i) { // iterate for every dot
yp[i] += sty[i];
if (yp[i] > doc_height-50) {
xp[i] = Math.random()*(doc_width-am[i]-30);
yp[i] = 0;
stx[i] = 0.02 + Math.random()/10;
sty[i] = 0.7 + Math.random();
doc_width = document.body.clientWidth;
doc_height = document.body.clientHeight;
}
dx[i] += stx[i];
document.all["dot"+i].style.pixelTop = yp[i];
document.all["dot"+i].style.pixelLeft = xp[i] + am[i]*Math.sin(dx[i]);
}
setTimeout("snowIE()", speed);
}
if (ns4up) {
snowNS();
} else if (ie4up) {
snowIE();
}

YEAH的东西我重发了一下,这样是不是清楚点了