jQuery移动和停止

Original 2018-12-14 18:38:18 217
abstract:<!DOCTYPE html><html><head> <meta charset="utf-8"> <title></title> <style type="text/css"> .box{width: 100px;height:100px;background:pink

<!DOCTYPE html>

<html>

<head>

<meta charset="utf-8">

<title></title>

<style type="text/css">

.box{width: 100px;height:100px;background:pink;position: absolute;}

</style>

<script type="text/javascript" src="jq.js"></script>

<script type="text/javascript">

$(document).ready(function(){

$('.you').click(function(){

$('.box').animate({

left:'+500px',

fontSize:'20px',

},

3000)

})

$('.sot').click(function(){

$('.box').stop(true,true)

})

})

</script>

</head>

<body>

<button class="you">右移</button>

<button class="sot">停止</button>

<div class="box">

冲鸭

</div>

</body>

</html>

`))72T1L)D(%_0T][D)ZNSS.png

Correcting teacher:灭绝师太Correction time:2018-12-15 09:31:21
Teacher's summary:案例测试不可以跟老师上课一样简单奥,多练习点,添加到案例中去

Release Notes

Popular Entries