对动画停止控制对应的四个方法都一 一加入小案例中。对消息队列更加理解

原创 2018-12-07 22:31:08 196
摘要:<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>Document</title> <script type="text/javascript" src="jqu
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Document</title>
<script type="text/javascript" src="jquery-3.3.1.js"></script>
<style type="text/css">
#aa{width: 100px;height: 100px;background-color: blue;position: absolute;}
</style>
<script type="text/javascript">
$("document").ready(function () {
$("#start").click(function(){
$("#aa").animate({left:"800px"},5000);
$("#aa").animate({width:"800px"},5000);
$("#aa").animate({height:"800px"},5000);})
$(".stop").click(function(){
$("#aa").stop();
})
$(".stop2").click(function(){
$("#aa").stop(true);
})
$(".stop3").click(function(){
$("#aa").stop(true,true);
})
})
</script>
</head>
<body>
<div>
<button id="start">开始</button>
<button>暂停当前队列</button>
<button>停止全部队列</button>
<button>结束当前任务并停止全部</button>
</div>
<div id="aa"></div>
</body>
</html>

20181207223026.png

批改老师:天蓬老师批改时间:2018-12-07 23:30:58
老师总结:你的类名,也太任性了, 下次用点语义的

发布手记

热门词条