<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>animate</title>
<script type="text/javascript" src="class library/jquery-1.10.2.min.js"></script>
<script>
$(document).ready(function(){
$('a').click(function(){
$('#div1').animate({height:'400px',width:'600px'},'slow');
});
});
</script>
<style>
a{ margin-left:650px;}
#div1{ color:red; border:3px dotted green; width:500px; height:300px; margin:0 auto;}
</style>
</head>
<body>
<a href="#">点我</a>
<div id="div1">animate( Hash params, String|NumberJavascript 字符串或数字值 speed, String easing , Function callback(可选) 在动画完成时执行的函数 )
用于创建自定义动画的函数。</div>
</body>
</html>
animate()
最新推荐文章于 2014-07-16 19:31:50 发布