为什么移动不了
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script src="http://libs.baidu.com/jquery/1.9.0/jquery.js" type="text/javascript"></script>
<title>jQuery动画特效</title>
<style>
div{
width:80px;
height:80px;
border:1px solid red;
background-color:red;
position:absolute;
left:10px;
top:30px;
}
</style>
</head>
<body>
<input type="button" value="左移" id="btn1"/>
<input type="button" value="右移" id="btn2"/>
<div></div>
<script type="text/javascript">
$(function(){
$("#btn1").bind("click",function(){
$("div").animate({
left:"-=50px";
},3000)
});
$("#btn2").bind("click",function(){
$("div").animate({
left:"+=50px";
},3000)
});
});
</script>
</body>
</html>