パーツ番号 02-10-25 ・ CSSのみ
ツートン下線見出し
見出し下線の左右をはっきり異なる2色に塗り分けたスタイル。比較記事やカテゴリ分けを示したい見出しに使える。
プレビュー
ソースコード
HTML
<div class="wrap">
<h4 class="ttl">ツートン下線見出し</h4>
</div>CSS
.d02-10-25 .wrap{ text-align:center; }
.d02-10-25 .ttl{ all:unset; position:relative; display:inline-block; font-size:22px; font-weight:800; color:#1f2937; padding-bottom:14px; }
.d02-10-25 .ttl::after{ content:""; position:absolute; left:0; bottom:0; width:100%; height:4px; background:linear-gradient(90deg,#1f2937 50%,#f59e0b 50%); }クラス名 .d02-10-25 は本ライブラリ内での識別用です。複数のパーツを同じページで使う場合は、重複しないよう名前を変更してください。