jquery实现上下四周运动

<html>
 <head>

<script type="text/javascript" src="http://ajax.microsoft.com/ajax/jquery
/jquery-1.4.min.js"></script>
        <script type="text/javascript">
          $(document).ready(function(){
            $("#red").animate({left:1237},2000);
            $("#red").animate({top:633},2000);
            $("#red").animate({left:0},2000);
            $("#red").animate({top:0},2000);
});
      
</script>
  
 </head>
 <body>
<div id="red" style="height:100px;width:200px;background-color:red;position:absolute;left:0;top:0"></div>
 </body>
</html>

 

你可能感兴趣的:(jquery实现上下四周运动)