案例:jquery案例     状态:可编辑再运行    进入竖版
 运行结果 
x
 
1
<!DOCTYPE html>
2
<html>
3
<head>
4
<script src="/js/jquery-1.11.1.min.js">
5
</script>
6
<script> 
7
$(document).ready(function(){
8
  $("button").click(function(){
9
    $("div").animate({left:'250px'});
10
  });
11
});
12
</script> 
13
</head>
14
 
15
<body>
16
<button>开始动画</button>
17
<p>默认情况下,所有 HTML 元素的位置都是静态的,并且无法移动。如需对位置进行操作,记得首先把元素的 CSS position 属性设置为 relative、fixed 或 absolute。</p>
18
<div style="background:#98bf21;height:100px;width:100px;position:absolute;">
19
</div>
20
21
</body>
22
</html>
23