Home  >  Article  >  Backend Development  >  求助、求一个浪漫的源码、大神们帮帮忙

求助、求一个浪漫的源码、大神们帮帮忙

WBOY
WBOYOriginal
2016-06-23 14:19:27984browse

源代码 PHP 玫瑰 浪漫

让网页飘满玫瑰、

但我想像QQ空间发完说说后飘满整个屏幕的玫瑰花瓣源码

能用PHP最好了、其他的能实现也可以、麻烦了

我的邮箱lixunka@qq.com

真的、求求大家帮帮忙、跪谢!!!!!!!!

回复讨论(解决方案)

这个是JS代码。。。

大哥、能帮忙做个吗?

这个是JS代码。。。 能帮忙做个吗?大哥大神求你勒

随便上网找一个雪花飞舞的代码,然后把雪花改成玫瑰就好了,比如

<html><head><title>雪花飞舞</title></head><body><div style="position: absolute; top: 142; left: 270; width: 189; height: 18">  <div style="position: absolute; top: 39; left: 31; width: 189; height: 15">  <table border="0" width="100%" cellspacing="0" cellpadding="0">    <tr>      <td width="100%"><font size="2"><b>雪花飞舞的感觉怎么样?</b></font></td>    </tr>  </table>  </div></div><p><script language="JavaScript"><!--var no = 5;				//雪片数目var speed = 20;			//飘动速度。(值越大越慢)var ns4up = (document.layers) ? 1 : 0;		//当前浏览器类型,如果是NS则为1var ie4up = (document.all) ? 1 : 0;		//当前浏览器类型,如果是IE则为1var s, x, y, sn, cs;var a, r, cx, cy;var i, doc_width = 800, doc_height = 600;x = new Array();y = new Array();r = new Array();cx = new Array();cy = new Array();s = 8;						//每次下落的高度,越小越平滑,但是也越慢if (ns4up) {					//以NS兼容方式doc_width = self.innerWidth;			//取页面宽度doc_height = self.innerHeight;			//取页面高度}elseif (ie4up) {					//以IE兼容方式doc_width = document.body.clientWidth;		//取页面宽度doc_height = document.body.clientHeight;	//取页面高度}for (i = 0; i < no; ++ i) {  //根据前面定义的雪片数目写进相应数目的层initSnow();			//随机初始化层的坐标if (ns4up) {			//如果浏览器是NS//用layer作为雪片(星号)的容器document.write("<layer name=\"dot"+ i +"\" left=\"1\" ");document.write("top=\"1\" visibility=\"show\"><font color=\"red\">");document.write("*</font></layer>");}else if (ie4up) {			//如果浏览器是IE//用div作为雪片的容器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 initSnow() {a = 6;r[i] = 1;sn = Math.sin(a);cs = Math.cos(a);cx[i] = Math.random() * doc_width + 1;cy[i] = Math.random() * doc_height + 1;x[i] = r[i] * sn + cx[i];y[i] = cy[i];}//计算雪花位置,从新位置上出现,看起来就像是新产生的一样。function makeSnow() {r[i] = 1;cx[i] = Math.random() * doc_width + 1;cy[i] = 1;x[i] = r[i] * sn + cx[i];y[i] = r[i] * cs + cy[i];}//雪花下落的计算function updateSnow() {r[i] += s;			x[i] = r[i] * sn + cx[i];y[i] = r[i] * cs + cy[i];}//在NS浏览器上处理雪片下落的主程序function SnowdropNS() {for (i = 0; i < no; ++ i) {	//依次处理每片雪花updateSnow();			//下落if ((x[i] <= 1) || (x[i] >= (doc_width - 20)) || (y[i] >= (doc_height - 20))) {	//如果超出屏幕范围makeSnow();						//则调整雪片到新位置上doc_width = self.innerWidth;				//更新页面宽度数据doc_height = self.innerHeight;				//更新页面高度数据}document.layers["dot"+i].top = y[i];				//改变层的Y坐标,应用新的位置document.layers["dot"+i].left = x[i];				//改变层的X坐标,应用新的位置}setTimeout("SnowdropNS()", speed);}//在IE浏览器上处理雪片下落的主程序function SnowdropIE() {for (i = 0; i < no; ++ i) {	//依次处理每片雪花updateSnow();			//下落if ((x[i] <= 1) || (x[i] >= (doc_width - 20)) || (y[i] >= (doc_height - 20))) {	//如果超出屏幕范围makeSnow();						//则调整雪片到新位置上doc_width = document.body.clientWidth;			//更新页面宽度数据doc_height = document.body.clientHeight;			//更新页面高度数据}document.all["dot"+i].style.pixelTop = y[i];			//改变层的坐标,应用新的位置document.all["dot"+i].style.pixelLeft = x[i];}setTimeout("SnowdropIE()", speed);				//准备下一次下落过程。}if (ns4up) {		//如果是NSSnowdropNS();	//调用SnowdropNS使雪片下落}elseif (ie4up) {		//如果是NSSnowdropIE();	//调用SnowdropIE使雪片下落}--></script></body></html>

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn