abstract:<!DOCTYPE html><html><head><meta charset="UTF-8"><title>jQuery 自定义动画-停止动画</title><script src="http://libs.baidu.com/jquery/2.0.0/jquery.js"&g
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>jQuery 自定义动画-停止动画</title>
<script src="http://libs.baidu.com/jquery/2.0.0/jquery.js"></script>
<style>
button{font-size: 38px;background: #999;padding:10px;border-color: #000;}
div{background: blue;width: 100px;height: 100px;margin-top: 20px;position: absolute;}
</style>
</head>
<body>
<script type="text/javascript">
$(document).ready(function(){
$('#start').click(function(){
$('.box1').animate({left:'+500px'},1000)
$('.box1').animate({fontSize:'30px'},500)
$('.box1').animate({bottom:'+300px'},1000)
$('.box1').animate({left:'+10px'},1000)
$('.box1').animate({top:'+80px'},1000)
})
$('#stop').click(function(){
$('.box1').stop(true)
})
})
</script>
<button id="start">启动</button>
<button id="stop">停止</button>
<div>this is a box</div>
</body>
</html>
Correcting teacher:灭绝师太Correction time:2019-03-05 13:29:01
Teacher's summary:停止动画一般都结合在jq动画效果上,带案例测试更明显!