<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ru">
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html;charset=gb2312" />
<script src="http://code.jquery.com/jquery.min.js" type="text/javascript"></script>
<style type="text/css">
.canvas{
width:500px;
height:500px;
position:relative;
}
</style>
</head>
<body>
<div>
<input type="button" onclick="javascript:falling.init();" value="GO" />
</div>
<div class="canvas" id="canvas"></div>
<script type="text/javascript">
//http://mitworld.mit.edu/explorer
/*
*坠落效果
*/
function Falling(){
this.dict=["abcd","2222","sign","next","container","content","last","break","less","than","that","ab
solute","relative","my","index","html","java","c#","web","javascript","php","include","shit","bull"
,"big","smart","call","apply","callee","caller","function"];
this.canvas=$("#canvas");
this.step=15;
this.freq=10;
this.height=500;
this.width=500;
this.si=null;
}
Falling.prototype={
fallingAction:function(dom){
var self=this;
var freqs=[10,15,20];//每次下落的距离
var disS=[];//记录所有 dom 的当前距离
var disPerFreqS=[];//每个 dom 的
var targetDis=500;