日期:2014-05-18 浏览次数:20462 次
<!DOCTYPE html> <html> <head> <style> .block1,.block2 { position:absolute; background-color:#abc; left:100px; width:100px; height:100px; margin:5px; } .block2{top:120px;} </style> <script src="jquery.js"></script> </head> <body> <div class="block1"></div> <div class="block2"></div> <script> $(".block1").animate({"left": "+=200"}, "slow"); $(".block2").animate({"left": "200"}, "slow"); </script> </body> </html>