私はウェブサイトのスタイルガイドを作成したいと思っており、h1 があるとします。次のテキストの前に、文字の下部から次の文字の上部まで、常に 28 ピクセルの下部マージンが必要です。問題は、行の高さが常に余分なスペースを追加する場合、HTML では、テキストごとに異なる可能性があることです。たとえば、常に 28px になるように、使用する margin-bottom の正確な量を知るルールはありますか?
<h1>HL1: Meine Bestellungen</h1>
<h2>SL1: Bestellnr. 1234563</h2>
h1 {
background: none repeat scroll 0 0 rgb(255, 255, 0);
color: rgb(153, 145, 141);
font-family: Georgia;
font-size: 26px;
font-weight: normal;
letter-spacing: 0;
line-height: 30px;
margin-bottom: 28px;
text-decoration: none;
text-transform: uppercase;
}
h2 {
background: none repeat scroll 0 0 rgb(0, 255, 0);
color: rgb(196, 18, 47);
font-family: Lucida Sans;
font-size: 12px;
font-weight: normal;
letter-spacing: 0.1em;
line-height: 20px;
margin-bottom: 6px;
text-decoration: none;
text-transform: uppercase;
}
ありがとう!