标题

HTML 中的所有标题标签,<h1> 到 <h6> 均可使用。另外,还提供了 .h1 到 .h6 类,为的是给内联(inline)属性的文本赋予标题的样式。

h1. Bootstrap heading

Semibold 36px

h2. Bootstrap heading

Semibold 30px

h3. Bootstrap heading

Semibold 24px

h4. Bootstrap heading

Semibold 18px

h5. Bootstrap heading

Semibold 14px

h6. Bootstrap heading

Semibold 12px
<h1>h1. Bootstrap heading</h1>
<h2>h2. Bootstrap heading</h2>
<h3>h3. Bootstrap heading</h3>
<h4>h4. Bootstrap heading</h4>
<h5>h5. Bootstrap heading</h5>
<h6>h6. Bootstrap heading</h6>

在标题内还可以包含 <small> 标签或赋予 .small 类的元素,可以用来标记副标题。

<h1>h1. Bootstrap heading <small>Secondary text</small></h1>
<h2>h2. Bootstrap heading <small>Secondary text</small></h2>
<h3>h3. Bootstrap heading <small>Secondary text</small></h3>
<h4>h4. Bootstrap heading <small>Secondary text</small></h4>
<h5>h5. Bootstrap heading <small>Secondary text</small></h5>
<h6>h6. Bootstrap heading <small>Secondary text</small></h6>

页面主体

Bootstrap 将全局 font-size 设置为 14pxline-height 设置为 1.428。这些属性直接赋予 <body> 元素和所有段落元素。另外,<p> (段落)元素还被设置了等于 1/2 行高(即 10px)的底部外边距(margin)。

内联文本元素

Marked text

<mark> 标签 会使文字高亮

You can use the mark tag to <mark>highlight</mark> text.

被删除的文本

对于被删除的文本使用 <del> 标签。

<del>This line of text is meant to be treated as deleted text.</del>

利用 HTML 自带的表示强调意味的标签来为文本增添少量样式。

小号文本

对于不需要强调的inline或block类型的文本,使用 <small> 标签包裹,其内的文本将被设置为父容器字体大小的 85%。标题元素中嵌套的 <small> 元素被设置不同的 font-size 。

你还可以为行内元素赋予 .small 类以代替任何 <small> 元素。

<small>This line of text is meant to be treated as fine print.</small>

着重

通过增加 font-weight 值强调一段文本。

The following snippet of text is rendered as bold text.

<strong>rendered as bold text</strong>

斜体

用斜体强调一段文本。

The following snippet of text is rendered as italicized text.

<em>rendered as italicized text</em>

在 HTML5 中可以放心使用 <b> 和 <i> 标签。<b> 用于高亮单词或短语,不带有任何着重的意味;而 <i> 标签主要用于发言、技术词汇等。

对齐

通过文本对齐类,可以简单方便的将文字重新对齐。

text-left 左对齐 text-center 居中  看代码

<p class="text-left">Left aligned text.</p>
<p class="text-center">Center aligned text.</p>
<p class="text-right">Right aligned text.</p>
<p class="text-justify">Justified text.</p>
<p class="text-nowrap">No wrap text.</p>

改变大小写

通过这几个类可以改变文本的大小写。

lowercased text.

UPPERCASED TEXT.

Capitalized Text.

<p class="text-lowercase">Lowercased text.</p>
<p class="text-uppercase">Uppercased text.</p>
<p class="text-capitalize">Capitalized text.</p>

引用

在你的文档中引用其他来源的内容。

默认样式的引用

将任何 HTML 元素包裹在 <blockquote> 中即可表现为引用样式。对于直接引用,我们建议用 <p> 标签。

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.

<blockquote><p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.</p>
</blockquote>

多种引用样式

对于标准样式的 <blockquote>,可以通过几个简单的变体就能改变风格和内容。

命名来源

添加 <footer> 用于标明引用来源。来源的名称可以包裹进 <cite>标签中。

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.

Someone famous in Source Title

<blockquote><p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.</p><footer>Someone famous in <cite title="Source Title">Source Title</cite></footer>
</blockquote>

另一种展示风格

通过赋予 .blockquote-reverse 类可以让引用呈现内容右对齐的效果。

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.

Someone famous in Source Title

<blockquote class="blockquote-reverse">...
</blockquote>

代码

内联代码

通过 <code> 标签包裹内联样式的代码片段。

For example, <code>&lt;section&gt;</code> should be wrapped as inline.

用户输入

通过 <kbd> 标签标记用户通过键盘输入的内容。

To switch directories, type <kbd>cd</kbd> followed by the name of the directory.<br>
To edit settings, press <kbd><kbd>ctrl</kbd> + <kbd>,</kbd></kbd>

代码块

多行代码可以使用 <pre> 标签。为了正确的展示代码,注意将尖括号做转义处理。

<pre>&lt;p&gt;Sample text here...&lt;/p&gt;</pre>

还可以使用 .pre-scrollable 类,其作用是设置 max-height 为 350px ,并在垂直方向展示滚动条。

Bootstrap文字排版方面css实用类相关推荐

  1. 【前端第四课】CSS值和单位;CSS文字排版;CSS变换,过渡,动画;CSS定位

    目标 了解掌握CSS值和单位 了解掌握CSS文字排版 了解掌握CSS变换,过渡,动画 了解掌握CSS定位 CSS的值和单位 https://developer.mozilla.org/zh-CN/do ...

  2. php中的文字排版问题,CSS布局中常用的文字排版相关属性详解

    本篇文章给大家带来的内容是关于CSS布局中常用的文字排版相关属性详解,有一定的参考价值,有需要的朋友可以参考一下,希望对你有所帮助. CSS布局中常用的文字排版相关属性详解 一.设定文字字体.颜色.大 ...

  3. ppwjs之bootstrap文字排版:排版常量

    2019独角兽企业重金招聘Python工程师标准>>> $bootstrap.字体.加粗类 = "font-weight-bold"; $bootstrap.字体 ...

  4. html无序列表文字换行,ppwjs之bootstrap文字排版:无序列表项不换行

    ppwjs欢迎您 //程序开始 引入(_sys_bootstrap4_all_addr + ".js",$真); var 标题1 = "以下为有序列表的默认格式和不换行格 ...

  5. ppwjs之bootstrap文字排版:kbd元素(键盘格式元素)

    2019独角兽企业重金招聘Python工程师标准>>> <!DOCTYPT html> <html><head><meta http-equ ...

  6. ppwjs之bootstrap文字排版:到增大字号元素

    <!DOCTYPT html> <html><head><meta http-equiv="content-type" content=& ...

  7. ppwjs之bootstrap文字排版:创建缩小字号元素

    2019独角兽企业重金招聘Python工程师标准>>> <!DOCTYPT html> <html><head><meta http-equ ...

  8. ppwjs之bootstrap文字排版:引用元素

    <!DOCTYPT html> <html><head><meta http-equiv="content-type" content=& ...

  9. ppwjs之bootstrap文字排版:创建增大字号元素

    2019独角兽企业重金招聘Python工程师标准>>> <!DOCTYPT html> <html><head><meta http-equ ...

  10. bootstrap世界探索1——山川河流(文字排版)

    世界到底是什么?其实世界很简单,正所谓一花一世界,一树一菩提,世界就在我们身边.造物神是伟大的,在我看来无论是HTML,css,js都可以看作是一个世界,但是他们是构成宏观世界不可或缺的,正如IU框架 ...

最新文章

  1. c语言斐波那契数列_斐波那契数列之美
  2. 单链表的几个基本操作
  3. Adam公式+参数解析
  4. NoSql中的B-tree、B+tree和LSM-tree
  5. vue实现todo功能(一):搭建vue-webpack环境
  6. 面试中回答离职原因的万能公式
  7. WCF的追踪分析工具——SvcPerf
  8. EclipseIDEA使用经验
  9. MyBatis foreach语句批量插入数据
  10. Android API介绍
  11. 【CSS系列】获取实时数据做进度
  12. 珍藏版《一步一步学PLC编程》全套资料!
  13. [病毒木马] LSP劫持
  14. android手机录屏工具,安卓手机上有什么好用的屏幕录屏软件可以推荐?
  15. 新款大屏卡罗拉linux系统,丰田卡罗拉大屏车载导航影音系统
  16. Java复习第二弹!
  17. 服务器硬盘开机吱吱响,开机时硬盘吱吱响的原因
  18. ECC椭圆曲线加密的特点以及在有限域(Fp)的三点共线问题
  19. 微信公众号语音内容提取下载
  20. 英语语法---连接词详解

热门文章

  1. 编译报错【error】dexpreopt.sh:23 exited with status 1
  2. 如何做到秒级扩容1000加业务节点
  3. Python通用编程 - 第二章:流程控制
  4. 英文邮件开场白(Dear / Hi / TO)
  5. 碳膜、金属膜、金属氧化膜电阻区别
  6. Linus 没空实现的功能,开发者做到了:苹果 M1 Mac 成功运行原生 Linux!
  7. 【开发心得】微信网页应用授权登录
  8. 从黑马学完IT,能进大厂吗?会不会遭歧视?答案来了…
  9. co作为前缀的意思_co前缀是什么意思
  10. 德龙钢铁大脑:更锐的眼,更快的脑