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

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