重要理解stop后面的两个参数作用

Original 2018-11-19 03:27:26 243
abstract:<!DOCTYPE html><html><head>  <title></title>  <script type="text/javascript" src="jquery-3.3.1.js"></script><style type="
<!DOCTYPE html>
<html>
<head>
  <title></title>
  <script type="text/javascript" src="jquery-3.3.1.js"></script>
<style type="text/css">
.box1{
  height: 200px;
  width:200px;
  background:blue;
  position: absolute;
}
</style>
<script type="text/javascript">
$(document).ready(function(){
  $('#right').click(function(){
    $('.box1').animate({ left:'500px'  },3000)
     $('.box1').animate({ fontSize:'30px'  },500)
  })
   $('#stop').click(function(){
    $('.box1').stop(true)//默认false  停止后字体继续放大,true时不放大
  })
})
</script>
</head>
<body>
<button id='right'>右移</button>
<button id='stop'>停止</button>
<div class='box1'>php中文网</div>
</body>
</html>


Correcting teacher:韦小宝Correction time:2018-11-19 09:16:27
Teacher's summary:不错!但是缺少总结!代码缺少高亮!下次记得带上哦!

Release Notes

Popular Entries