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

パーツ番号 02-16-25 ・ CSSのみ

三角マーカーのサイズ差で階層を示す見出しセット

行頭の三角マーカーをCSSのborderで描き、h2は大きく濃く、h3は中くらい、h4は小さく淡くする。方向を持つ記号なので、下位ほど「その先の細目」に見えるのが利点。手続き案内ページに向く。

staticcss

プレビュー

ソースコード

HTML

<div class="set">
          <p class="lv2">お手続き案内</p>
          <p class="lv3">必要書類の準備</p>
          <p class="lv4">本人確認書類</p>
        </div>

CSS

.d02-16-25 .set{ width:100%; display:flex; flex-direction:column; gap:16px; }
        .d02-16-25 .lv2{ margin:0; font-size:23px; font-weight:800; color:#065f46; line-height:1.35; display:flex; align-items:center; gap:12px; }
        .d02-16-25 .lv2::before{ content:""; width:0; height:0; border-style:solid; border-width:9px 0 9px 14px; border-color:transparent transparent transparent #059669; flex:none; }
        .d02-16-25 .lv3{ margin:0; font-size:18px; font-weight:700; color:#047857; line-height:1.35; display:flex; align-items:center; gap:12px; padding-left:16px; }
        .d02-16-25 .lv3::before{ content:""; width:0; height:0; border-style:solid; border-width:6px 0 6px 9px; border-color:transparent transparent transparent #34d399; flex:none; }
        .d02-16-25 .lv4{ margin:0; font-size:14px; font-weight:700; color:#4b5563; line-height:1.35; display:flex; align-items:center; gap:12px; padding-left:32px; }
        .d02-16-25 .lv4::before{ content:""; width:0; height:0; border-style:solid; border-width:4px 0 4px 6px; border-color:transparent transparent transparent #a7f3d0; flex:none; }

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