jquery 路径动画贝塞尔动画

jquery 路径动画贝塞尔动画

<pre>
<!DOCTYPE html>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
<style>
div{
position: absolute;
top: 0px;
left: 0px;
}
#box{
200px;
height: 200px;
background: red;
}
#conn{
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>

原文地址:https://www.cnblogs.com/newmiracle/p/11853132.html