动画的停止和操作

Original 2019-05-16 12:04:00 129
abstract:<!DOCTYPE html><html> <head> <meta charset="UTF-8"> <title></title> <script type="text/javascript" src="js/jquery-3.3.1.min.js"&

<!DOCTYPE html>

<html>

<head>

<meta charset="UTF-8">

<title></title>

<script type="text/javascript" src="js/jquery-3.3.1.min.js"></script>

<style type="text/css">

div{width: 200px;height: 200px;background:blue;position: absolute; color: #fff;}

</style>

<script>

$(document).ready(function(){

$('#right').click(function(){

$('.box1').animate({left:'+200px'},3000)

$('.box1').animate({fontSize:'50px'},500)

})

$('#stop').click(function(){

$('.box1').stop(true,true);

})

})

</script>


</head>

<body>

<button id="right">右移</button>

<button id="stop">停止</button>

<div class="box1"> php中文网</div>

</body>

</html>


Correcting teacher:查无此人Correction time:2019-05-17 10:01:49
Teacher's summary:完成的不错。每行js语句结束增加;号。继续加油

Release Notes

Popular Entries