自定义动画:animate(样式,时间)
只能对数字类型的样式设置动画
使用链式编程,可以将多个动画拼接起来
选择器“:animated”,选择正在执行动画的元素
停止动画:stop();
如果不传递参数,表示停止当前动画,后续动画会继续执行
传递参数true,表示停止当前动画,并且清除所有的动画队列
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>自定义动画</title>
<style>
#div1 {
width:100px; height:100px;
background-color:black;
}
</style>
<script src="scripts/jquery-1.7.1.min.js"></script>
<script>
$(function() {
//自定义动画按钮
$('#btnAnimate').click(function(){
$(&#