答案是这样么
<html>
<head>
<title>制作移动位置的动画</title>
<script src="http://libs.baidu.com/jquery/1.9.0/jquery.js" type="text/javascript"></script>
<link href="style.css" rel="stylesheet" type="text/css" />
</head>
<body>
<style> div{
position: absolute;
width: 80px;
height: 80px;
right:10px;
left:100px;
border: solid 1px #ccc;
margin: 0px 8px;
background-color: Red;
color: White;
vertical-align: middle;
}</style>
<h3>制作移动位置的动画</h3>
<div></div>
<input id="btnStop1" type="button" value="左移" />
<input id="btnStop2" type="button" value="右移" />
<script type="text/javascript">
$(function () {
$("#btnStop1").bind("click", function () {
$("div").animate({
left: "-=100px"
}, 3000, function () {
});
});
$("#btnStop2").bind("click", function () {
$("div").animate({
left: "+=100px"
}, 3000, function () {
});
});
});
</script>
</body>
</html>