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>
如果遇到什么不懂的地方直接关注公众号留言(本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须在文章页面给出原文连接,否则保留追究法律责任的权利。)
作者:newmiracle
出处:https://www.cnblogs.com/newmiracle/