动画自用

<!DOCTYPE html>
<html>
<head>
	<title></title>
</head>
<script src="https://code.jquery.com/jquery-3.1.1.min.js"></script>
<style>
    .joinShopCarAnimation {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        margin: auto;
        width: 200px;
        height: 200px;
        border-radius: 50%;
        z-index: 999999;
        /*transition: all 2s;*/
    }
    .t1{
    	transition: transform 2s;
        transform: scale(2);
    }
    .t2{
    	transition:all 2s ;
    	width:1px;
    	height:1px;
    	transform: translate(300px,50px);
    }
</style>
<body>
    <script>
    	var t0 = $('<div> <img src="http://baoyitech.oss-cn-hangzhou.aliyuncs.com/155610165000057acc0525856bc8888d9abb870d4b302" class="joinShopCarAnimation"></div>');
    	var t = $("body").append(t0)
    	setTimeout(function(){
    		t0.find("img").addClass("t1");
    	},0)
    	var x = $(window).width()/2-10;
    	var me = 400;
    	var y = $(window).height()/2-10;
    	// var y = $(".t").height()+20
    	setTimeout(function(){
    		t0.find("img").addClass("t2").css("transform","translate("+x+"px,"+(y-me)+"px)");
    	},2000)
    	setTimeout(function(){
    		t0.remove();
    	},4000)
        </script>

</body>
</html>

  

转载于:https://www.cnblogs.com/beimingbingpo/p/11457975.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值