这样写错了吗。。。显示不出来
<!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">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>jQuery动画特效</title>
<script src="http://libs.baidu.com/jquery/1.9.0/jquery.js" type="text/javascript"></script>
<style>
span
{
position:absolute;
width:80px;
height:80px;
border: solid 1px #ccc;
margin: 0px 8px;
background-color: Red;
color:White;
vertical-align:middle
}
div
{
margin: 10px 0px;
position:relative;
}
</style>
</head>
<body>
<input type="button" class="btns1" value="左移"/>
<input type="button" class="btns2" value="右移"/>
<span></span>
<div id="tip"></div>
<script>
$(function(){
$(".btns1").bind("click",function(){
$("span").animate{
left:"-=50px"
}, 3000, function () {
$("#tip").html("执行完成!");
}
});
$(".btns2").bind("click",function(){
$("span").animate{
left:"+=50px"
}, 3000, function () {
$("#tip").html("执行完成!");
}
});
});
</script>
</body>
</html>