テキスト下の不要な余白を消す方法

テキスト下に生まれる不要な余白を消す方法

テキストの疑似要素にネガティブマージンを指定する
・html
|
1 2 |
<h2>OUR<br />SERVICE</h2> <img src="images/image01.jpg" alt="" /> |
・css
|
1 2 3 4 5 6 7 8 9 10 11 |
h2 { font-size: 6rem; line-height: 1.4; letter-spacing: 0.05em; margin-bottom: 0; } h2::after { display: block; content: ""; margin-top: -21px; } |

![MARKLEAPS[マークリープス]](https://markleaps.com/blog/wp-content/themes/mkl/images/00_logo.png)


![[CSS] shape-outside プロパティで画像にテキストを回り込ませる方法](https://markleaps.com/blog/wp-content/uploads/2025/09/css-shape-outside-500x254.jpg)
![[HTML・CSS] 説明リストdlのdtとddを横並びに表示する方法(コピペで使えるコード付き)](https://markleaps.com/blog/wp-content/uploads/2025/09/html-css-dl-flex-grid-500x254.jpg)
![[CSS] 疑似クラス is() とwhere() の使い方と違い](https://markleaps.com/blog/wp-content/uploads/2023/11/css-is-where-500x254.jpg)