<br>
<br>
<br>
<title>雪花飞舞</title><br>
<br>
<br>
<div>
<br>
<div>
<br>
<table>
<br>
<tr>
<br>
<td><font><b>雪花飞舞的感觉怎么样?</b></font></td>
<br>
</tr>
<br>
</table>
<br>
</div>
<br>
</div><br>
<br>
<p><br>
<script><br />
<!--<br />
var no = 5; //雪片数目<br />
var speed = 20; //飘动速度。(值越大越慢)<br />
var ns4up = (document.layers) ? 1 : 0; //当前浏览器类型,如果是NS则为1<br />
var ie4up = (document.all) ? 1 : 0; //当前浏览器类型,如果是IE则为1<br />
var s, x, y, sn, cs;<br />
var a, r, cx, cy;<br />
var i, doc_width = 800, doc_height = 600;<br />
x = new Array();<br />
y = new Array();<br />
r = new Array();<br />
cx = new Array();<br />
cy = new Array();<br />
s = 8; //每次下落的高度,越小越平滑,但是也越慢<br />
if (ns4up) { //以NS兼容方式<br />
doc_width = self.innerWidth; //取页面宽度<br />
doc_height = self.innerHeight; //取页面高度<br />
}<br />
else<br />
if (ie4up) { //以IE兼容方式<br />
doc_width = document.body.clientWidth; //取页面宽度<br />
doc_height = document.body.clientHeight; //取页面高度<br />
}<br />
<br />
for (i = 0; i < no; ++ i) { //根据前面定义的雪片数目写进相应数目的层<br />
initSnow(); //随机初始化层的坐标 <div class="clear"></script></p>
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