dom.style.width=Math.random()*500+'px'
不明白你的意思

解决方案 »

  1.   

     就是1个div 会缩大缩小哈用css3 scale哈 你这个描点不是中心。。
      

  2.   


    <!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>
    <title> new document </title>
    <style type="text/css">
    .w {
    background-color: #ff3300;
    }
    </style>
    </head><body>
    <script type="text/javascript" src="http://code.jquery.com/jquery-latest.js"></script> 
    <div class="w"></div>
    <br />
    <div class="w"></div>
    <br />
    <div class="w"></div>
    <script type="text/javascript">
    $(".w").each(function(){
    $(this).width(Math.floor(Math.random()*300)+20);
    $(this).height(Math.floor(Math.random()*300)+20);
    })
    </script>
    </body>
    </html>
      

  3.   

    我晕 要不停的运动。。要用scale哦。。