Dreamweaver 下雪代码相关

来源:百度知道 编辑:UC知道 时间:2024/05/15 17:26:42
这是我网上找到的代码
</style>
<script language="javascript">

snow = false; // false-rain; true-snow
snowsym = " * " //These are the symbols for each
rainsym = " * " //You can put images here.
howmany = 15 //How many drops/snowflakes?

/**************Do not need to change anything below***********/
if(snow){sym = snowsym; speed=5; angle=6; drops=howmany}
else{sym = rainsym; speed=3; drops=howmany; angle=6}
movex = -speed/angle; movey = speed; count = 0;

function moverain(){
for(move = 0; move < drops; move++){
xx[move]+=movex; yy[move]+=mv[move];
hmm = Math.round(Math.random()*1);
if(xx[move] < 0){xx[move] = maxx+10;}
if(yy[move] > maxy){yy[move] = 10;}
drop[move].left = xx[move]
drop[move].top = yy[move]+document.body.scrollTop;
}setTimeout('moverain()','1')}

</script>
<scrip

<style>
.drop { position: absolute; width: 3; filter: flipV(), flipH(); font-size: 40; color: blue }
</style>
<script language="javascript">

snow = false; // false-rain; true-snow
snowsym = " * " //These are the symbols for each
rainsym = " * " //You can put images here.
howmany = 15 //How many drops/snowflakes?

/**************Do not need to change anything below***********/
if(snow){sym = snowsym; speed=5; angle=6; drops=howmany}
else{sym = rainsym; speed=3; drops=howmany; angle=6}
movex = -speed/angle; movey = speed; count = 0;

function moverain(){
for(move = 0; move < drops; move++){
xx[move]+=movex; yy[move]+=mv[move];
hmm = Math.round(Math.random()*1);
if(xx[move] < 0){xx[move] = maxx+10;}
if(yy[move] > maxy){yy[move] = 10;}
drop[move].left = xx[move]
drop[move].top = yy[move]+document.body.s