摘要:<html> <head> <title>jQuery的动画效果--自定义动画</title> <meta charset="utf-8"> <script type="text/javascri
<html>
<head>
<title>jQuery的动画效果--自定义动画</title>
<meta charset="utf-8">
<script type="text/javascript" src="jquery-3.3.1.min.js"></script>
<style type="text/css">
div{width: 200px;height: 200px;background:blue;position: absolute; color: #fff;}
</style>
<script type="text/javascript">
$('#right').click(function(){
$('.box1').animate({left:'+500px'},3000)
$('.box1').animate({fontSize:'30px'},500)
})
$('#stop').click(function(){
$('.box1').stop(true)
})
})
</script>
</head>
<body>
<!--
<button class="but1">点击字体放大</button>
<p>jQuery中我们使用 animate()方法创建自定义的动画</p>
<button class="but2">点击移动div</button>
<div></div>
-->
<!-- 点击右移按钮,div右移,点击停止按钮当前效果停止 -->
<button id="right">右移</button>
<button id="stop">停止</button>
<div class="box1"> php中文网</div>
</body>
</html>
批改老师:灭绝师太批改时间:2019-01-16 15:21:41
老师总结:你就把我的源码拷贝一份给我,你的学习有任何意义么?