0
円をアニメーション化することは可能ですか?私は2つのラインのパスと円をマージし、同じSVGプログレスバーアニメーション(開始円付き)
$(document).ready(function(){
var svgPath = document.getElementById('heart');
var path = new ProgressBar.Path(svgPath, {
duration: 3000
});
path.animate(-1, {
\t easing: 'easeOutBounce',
duration: 2000
}, function() {
console.log('Animation has finished');
});
});
#container {
\t width:220px;
position: relative;
}
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<script src="https://rawgit.com/kimmobrunfeldt/progressbar.js/1.0.0/dist/progressbar.js"></script>
<div id="container" style="width:200px;height:200px;">
<svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100.08 100" width="500" height="500">
<path d="M50,2A48,48,0,1,1,2,50,48,48,0,0,1,50,2" fill-opacity="0" stroke="#eee"/>
<circle cx="95.87" cy="64.33" r="2.66"/>
<path id="heart" fill-opacity="0" d="M95.6,65.16A48,48,0,1,1,50,2" fill="none" stroke="#000" />
</svg>
</div>
"円をアニメーション化"することはどういう意味でしょうか。あなたは明確にしていただけますか? – Dekel
私の例を確認してください - サークルはアニメーション化されていません。パスはストロークパスにアニールされていません – WebStarter
それで、自分自身をサークルして回転するようにしたいですか? – Dekel