DOM案例实现页面窗口的抖动,跟QQ很像哦

来源:岁月联盟 编辑:exp 时间:2012-03-02

js实现页面窗口的抖动,跟QQ很像哦,大家动手试一下,很简单,就几句代码
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml"> <head>


<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>

<script language="javascript" type="text/javascript">
    for(var i=0;i<200;i++){
        //向右抖20
        moveBy(20,0);
        //向下抖20
        moveBy(0,20);
        //向左抖20
        moveBy(-20,0);
        //想上抖20
        moveBy(0,-20);

}
   

</script>

</head>

<body>
</body>
</html>


摘自 刘海闯的专栏