SVGを使って円を描いて、輪郭に沿ったアニメーションをするサンプルです。 このアニメーションはCSSでSVGの属性を操作して、アニメーションを実装しています。 まず、SVGのcircleを用意します。 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 110 110" class="demo" > <circle cx="55" cy="55" r="50" class="demo" /> </svg> CSSでSVGのの輪郭を設定して、数値をアニメーションにします。 svg.demo{ margin:20px; width: 200px; display:block; margin:40px; } circle.demo{ fill:none; stroke:#00F; stroke-width:5px; stroke-dashar
![SVG 円の輪郭のアニメーション | キプレ - UIサンプル紹介](https://cdn-ak-scissors.b.st-hatena.com/image/square/25838e8f50d32d7da3444494d83ae3ae603ffc14/height=288;version=1;width=512/https%3A%2F%2Fwww.kipure.com%2Fimg%2Fthumb%2Fdetail%2F2021%2F2021-12-17-005749.png)