jQuery移动和停止

原创 2018-12-14 18:38:18 201
摘要:<!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

批改老师:灭绝师太批改时间:2018-12-15 09:31:21
老师总结:案例测试不可以跟老师上课一样简单奥,多练习点,添加到案例中去

发布手记

热门词条