摘要:<!DOCTYPE html><html><head> <meta charset="utf-8"> <title> jQuery 自定義動(dòng)畫(huà)-停止動(dòng)畫(huà)</title> <script type="text/javascript" src="jquery-3.3.1.mi
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title> jQuery 自定義動(dòng)畫(huà)-停止動(dòng)畫(huà)</title>
<script type="text/javascript" src="jquery-3.3.1.min.js"></script>
<style type="text/css">
div{width:200px;height:200px;background:pink;position:absolute;color:#4505;}
</style>
<script type="text/javascript">
$(document).ready(function(){
$('.right').click(function(){
$('.box1').animate({left:'+1720px'},3000)
$('.box1').animate({fontSize:'30px'},3000)
})
$('.stop').click(function(){
$('.box1').stop(true)
})
})
</script>
</head>
<body>
<button class='right'>右移</button>
<button class="stop">停止</button>
<div class='box1'>學(xué)習(xí)停止動(dòng)畫(huà)</div>
</body>
</html>
批改老師:韋小寶批改時(shí)間:2018-12-11 10:41:22
老師總結(jié):寫(xiě)的很不錯(cuò)!jquery中的動(dòng)畫(huà)還是挺好玩的!課后記得多練習(xí)哦!試著使用jquery來(lái)完成個(gè)輪播圖