返回jquery滑......登陆

jquery滑动以及停止动画效果

古桑2019-03-18 23:52:17187

<!DOCTYPE html>

<html lang="en">

<head>

<meta charset="UTF-8">

<title>Jquery滑动效果</title>

<script type="text/javascript" src="../zuoye/jquery-3.3.1.min.js"></script>

<style>

.box{height:300px; width:300px; background:#888; margin-top:15px; position:absolute; line-height:300px;text-align:center; color: #fff;}

</style>


<script>

$(document).ready(function(){

$('#start').click(function(){

$('.box').animate({left:'+800px'},2000);

$('.box').animate({fontSize:'40px'},500)

})

$('#stop').click(function(){

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

})

})

</script>

</head>

<body>

<button id="start">开始</button>

<button id="stop">停止</button>

<div class="box">

我是会变大的文字

</div>


</body>

</html>


最新手记推荐

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

全部回复(0)我要回复

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