Bootstrap 5 默认设置
- Bootstrap 5 默认的 font-size 为 16px, line-height 为 1.5
- 默认的 font-family 为 "Helvetica Neue", Helvetica, Arial, sans-serif
- 此外,所有的
元素 margin-top: 0 、 margin-bottom: 1rem (16px)
h1-h6
<template>
<div class="container">
<h1>h1 Bootstrap 标题</h1>
<h2>h2 Bootstrap 标题</h2>
<h3>h3 Bootstrap 标题</h3>
<h4>h4 Bootstrap 标题</h4>
<h5>h5 Bootstrap 标题</h5>
<h6>h6 Bootstrap 标题</h6>
<p class="h1">h1 Bootstrap 标题</p>
<p class="h2">h2 Bootstrap 标题</p>
<p class="h3">h3 Bootstrap 标题</p>
<p class="h4">h4 Bootstrap 标题 </p>
<p class="h5">h5 Bootstrap 标题</p>
<p class="h6">h6 Bootstrap 标题</p>
</div>
</template>
display: .display-1, .display-2, .display-3, .display-4
<template>
<div class="container">
<h3>Display 标题</h3>
<p>Display 标题可以输出更大更粗的字体样式。</p>
<h3 class="display-1">Display 1</h3>
<h3 class="display-2">Display 2</h3>
<h3 class="display-3">Display 3</h3>
<h3 class="display-4">Display 4</h3>
</div>
</template>
高亮
<template>
<div class="container">
<h1>高亮文本</h1>
<p>使用 mark 元素来 <mark>高亮</mark> 文本。</p>
</div>
</template>
文本底部虚线边框
<template>
<div class="container">
<h1>Abbreviations</h1>
<p>The abbr element is used to mark up an abbreviation or acronym:</p>
<p>The <abbr title="World Health Organization">WHO</abbr> was founded in 1948.</p>
</div>
</template>
引用
<template>
<div class="container">
<h1>Blockquotes</h1>
<p>The blockquote element is used to present content from another source:</p>
<blockquote class="blockquote">
<p>For 50 years, WWF has been protecting the future of nature. The world's leading conservation organization, WWF works in 100 countries and is supported by 1.2 million members in the United States and close to 5 million globally.</p>
<footer class="blockquote-footer">From WWF's website</footer>
</blockquote>
</div>
</template>