前端学习-UI框架学习-Bootstrap5-004-文字排版
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>
dl
code
kbd
分类:
前端学习 / UI框架学习
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 阿里最新开源QwQ-32B,效果媲美deepseek-r1满血版,部署成本又又又降低了!
· 单线程的Redis速度为什么快?
· SQL Server 2025 AI相关能力初探
· AI编程工具终极对决:字节Trae VS Cursor,谁才是开发者新宠?
· 展开说说关于C#中ORM框架的用法!