jquery 路径动画贝塞尔动画

jquery 路径动画贝塞尔动画

<pre>
<!DOCTYPE html>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
<style>
div{
position: absolute;
top: 0px;
left: 0px;
}
#box{
width: 200px;
height: 200px;
background: red;
}
#conn{
width:20px;
height: 20px;
background: green;
position: absolute;
left:10%;
top:10%;
}
</style>
</head>
<body>
<div id="conn"></div>
<script type="text/javascript" src="/youmenghengda/js/TweenMax.js" ></script>
<script>

TweenMax.to('#conn', 5, {bezier:[{left:"10%", top:"10%"}, {left:"30%", top:"30%"}, {left:"50%", top:"10%"}], repeat:10,yoyo:true, ease:Power1.easeInOut});


</script>
</body>
</html>
</pre>

posted @ 2019-11-13 20:55  newmiracle宇宙  阅读(266)  评论(0编辑  收藏  举报