TYPOGRAPHY / 061

Text outline

文字の輪郭線
文字の輪郭を線で描き、内部の塗りを抜きます。

実際のHTML・CSSで描かれた見本です。

ラボで詳しく試す ↗

ひとつ試すなら

中を抜いた文字の存在感を見る

こんなときに

大きな見出しや、背景を透かした文字。

仕組みと使い方

細かな文字では輪郭線が読みづらくなるため、大きさも確認します。

袋文字アウトライン輪郭stroke
実装コードを見る
<style>
.sample{width:100%;height:100%;min-height:190px;display:grid;place-items:center;position:relative;overflow:hidden;box-sizing:border-box;font-family:Arial,'Hiragino Kaku Gothic ProN',Meiryo,sans-serif;color:#20211d;background:#f1f0e9;padding:22px}.sample *{box-sizing:border-box}.sample button,.sample input,.sample summary{font:inherit}.sample button,.sample summary,.sample label{touch-action:manipulation}.sample :focus-visible{outline:3px solid #6050bf;outline-offset:5px}.sample small{font-size:10px;line-height:1.5}.sample .editable{margin:0}.sample svg{max-width:100%;height:auto}
.sample b{font-size:clamp(45px,12vw,76px);font-weight:900;color:transparent;-webkit-text-stroke:2px #222;letter-spacing:-.08em}
</style>
<div class="sample">
<b class="editable">good.</b>
</div>