JS animate动画

Posted ThisCall

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了JS animate动画相关的知识,希望对你有一定的参考价值。

<!DOCTYPE html>
<html lang="zh-cn">
<head>
<meta charset="utf-8">
<title></title>
<style>
#senda,#sendb{
position: relative;
}

</style>
</head>
<body>
<div id="senda">aaa</div>
<div id="sendb">bbbb</div>
</body>
<script src="js/jquery-1.11.3.js"></script>
<script>
$(function(){
var n=1;
var speed = 2000;
$(‘#senda‘).click(function(){
$(this).animate({left:"+=300px"}, speed, function(){
// $(this).clearQueue().delay(100).queue(function() {
speed += 1000;
// });
});
});
});
</script>
<script>
</script>
</html>
































以上是关于JS animate动画的主要内容,如果未能解决你的问题,请参考以下文章

js中animate是啥意思

CSS3实践之路:CSS3的过渡效果(transition)与动画(animation)

jquery中animate()动画方法

Animate.css+js实现鼠标经过动画效果

anime.js 简单入门教程

animate.css动画初始状态隐藏