← 静的パーツギャラリーへ戻る

パーツ番号 11-08-03 ・ CSSのみ

KPIリングカード(固定パーセント)

円形プログレスで達成率を固定表示するカードです。会員のポイント達成率や管理画面の月間目標表示に利用できます。

staticcss

プレビュー

ソースコード

HTML

<div class="d11-08-03-card">
          <svg class="d11-08-03-ring" viewBox="0 0 120 120">
            <circle cx="60" cy="60" r="50" fill="none" stroke="#e2e8f0" stroke-width="12"/>
            <circle class="d11-08-03-arc" cx="60" cy="60" r="50" fill="none" stroke="#f59e0b" stroke-width="12" stroke-linecap="round" stroke-dasharray="314" stroke-dashoffset="88" transform="rotate(-90 60 60)"/>
          </svg>
          <div class="d11-08-03-center">
            <span class="d11-08-03-pct">72<i>%</i></span>
            <span class="d11-08-03-cap">目標達成率</span>
          </div>
        </div>

CSS

.d11-08-03{background:#fffbeb}
        .d11-08-03-card{position:relative;width:160px;height:160px;display:flex;align-items:center;justify-content:center}
        .d11-08-03-ring{width:160px;height:160px}
        .d11-08-03-center{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center}
        .d11-08-03-pct{font-size:34px;font-weight:800;color:#0f172a;line-height:1}
        .d11-08-03-pct i{font-size:18px;font-style:normal;color:#f59e0b;margin-left:1px}
        .d11-08-03-cap{font-size:11px;color:#94a3b8;margin-top:4px}

クラス名 .d11-08-03 は本ライブラリ内での識別用です。複数のパーツを同じページで使う場合は、重複しないよう名前を変更してください。