Bootstrap-標題樣式
阿新 • • 發佈:2018-12-21
Bootstrap重新設定了margin-top和margin-bottom的值,
- h1~h3重置後的值都是20px;
- h4~h6重置後的值都是10px。
所有標題的行高都是1.1(也就是font-size的1.1倍),而且文字顏色和字型都繼承父元素的顏色和字型。
固定不同級別標題字型大小,
h1=36px,
h2=30px,
h3=24px,
h4=18px,
h5=14px,
h6=12px。
<div class="h1">標題一的字型大小為36px</div> <div class="h2">標題一的字型大小為30px</div> <div class="h3">標題一的字型大小為24px</div> <div class="h4">標題一的字型大小為18px</div> <div class="h5">標題一的字型大小為14px</div> <div class="h6">標題一的字型大小為12px</div> <hr> <!-- 副標題 --> <div class="h1">床前明月光 <small>疑是地上霜</small></div>