返回重要理解sto......登陆

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

古。。2018-11-19 03:27:26243
<!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>


最新手记推荐

• 用composer安装thinkphp框架的步骤• 省市区接口说明• 用thinkphp,后台新增栏目• 管理员添加编辑删除• 管理员添加编辑删除

全部回复(0)我要回复

暂无评论~
  • 取消回复发送