<style>
.box1{
width: 200px;
height: 200px;
background: deeppink;
}
.box2{
width: 200px;
height: 200px;
background: chartreuse;
position: absolute;
left: 0;
top: 0;
}
</style>
</head>
<body>
<div class="box1"></div>
<div class="box2"></div>
</body>
<script src="js/js/jquery-1.12.4.min.js"></script>
<script src="js/js/jquery.easing.1.3.js"></script>
<script >
$('.box1').on('mouseover',function(){
$(this).animate({width:400,height:400},'slow','easeInOutBack',function()
{
console.log('我是回调函数');
});
});
$('.box2').on('mouseover',function(){
$(this).animate({left:500},'slow',function(){
$(this).animate({top:500},'slow',function(){
$(this).animate({left:0},20000,function(){
$(this).animate({top:0},'slow');
});
});
});
});
</script>
jq 自定义动画animate
最新推荐文章于 2022-04-02 21:42:46 发布