パーツ番号 05-05-03 ・ CSSのみ
KPIリングカード
円形プログレスで達成率を可視化。画面に入ると弧が伸びて描かれます。会員のポイント達成率や管理画面の月間目標表示に。
プレビュー
ソースコード
HTML
<div class="d05-05-03-card">
<svg class="d05-05-03-ring" viewBox="0 0 120 120">
<circle cx="60" cy="60" r="50" fill="none" stroke="#e2e8f0" stroke-width="12"/>
<circle class="d05-05-03-arc" cx="60" cy="60" r="50" fill="none" stroke="#f59e0b" stroke-width="12" stroke-linecap="round" transform="rotate(-90 60 60)"/>
</svg>
<div class="d05-05-03-center">
<span class="d05-05-03-pct">72<i>%</i></span>
<span class="d05-05-03-cap">目標達成率</span>
</div>
</div>CSS
.d05-05-03{background:#fffbeb}
.d05-05-03-card{position:relative;width:160px;height:160px;display:flex;align-items:center;justify-content:center}
.d05-05-03-ring{width:160px;height:160px}
.d05-05-03-arc{stroke-dasharray:314;stroke-dashoffset:314;transition:stroke-dashoffset 1.1s cubic-bezier(.22,1,.36,1)}
.io-reveal.is-in .d05-05-03-arc{stroke-dashoffset:88}
.d05-05-03-center{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center}
.d05-05-03-pct{font-size:34px;font-weight:800;color:#0f172a;line-height:1}
.d05-05-03-pct i{font-size:18px;font-style:normal;color:#f59e0b;margin-left:1px}
.d05-05-03-cap{font-size:11px;color:#94a3b8;margin-top:4px}クラス名 .d05-05-03 は本ライブラリ内での識別用です。複数のパーツを同じページで使う場合は、重複しないよう名前を変更してください。