Bootstrap文字排版方面css实用类
标题
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
设置为 14px,line-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><section></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><p>Sample text here...</p></pre>
还可以使用 .pre-scrollable
类,其作用是设置 max-height 为 350px ,并在垂直方向展示滚动条。
Bootstrap文字排版方面css实用类相关推荐
- 【前端第四课】CSS值和单位;CSS文字排版;CSS变换,过渡,动画;CSS定位
目标 了解掌握CSS值和单位 了解掌握CSS文字排版 了解掌握CSS变换,过渡,动画 了解掌握CSS定位 CSS的值和单位 https://developer.mozilla.org/zh-CN/do ...
- php中的文字排版问题,CSS布局中常用的文字排版相关属性详解
本篇文章给大家带来的内容是关于CSS布局中常用的文字排版相关属性详解,有一定的参考价值,有需要的朋友可以参考一下,希望对你有所帮助. CSS布局中常用的文字排版相关属性详解 一.设定文字字体.颜色.大 ...
- ppwjs之bootstrap文字排版:排版常量
2019独角兽企业重金招聘Python工程师标准>>> $bootstrap.字体.加粗类 = "font-weight-bold"; $bootstrap.字体 ...
- html无序列表文字换行,ppwjs之bootstrap文字排版:无序列表项不换行
ppwjs欢迎您 //程序开始 引入(_sys_bootstrap4_all_addr + ".js",$真); var 标题1 = "以下为有序列表的默认格式和不换行格 ...
- ppwjs之bootstrap文字排版:kbd元素(键盘格式元素)
2019独角兽企业重金招聘Python工程师标准>>> <!DOCTYPT html> <html><head><meta http-equ ...
- ppwjs之bootstrap文字排版:到增大字号元素
<!DOCTYPT html> <html><head><meta http-equiv="content-type" content=& ...
- ppwjs之bootstrap文字排版:创建缩小字号元素
2019独角兽企业重金招聘Python工程师标准>>> <!DOCTYPT html> <html><head><meta http-equ ...
- ppwjs之bootstrap文字排版:引用元素
<!DOCTYPT html> <html><head><meta http-equiv="content-type" content=& ...
- ppwjs之bootstrap文字排版:创建增大字号元素
2019独角兽企业重金招聘Python工程师标准>>> <!DOCTYPT html> <html><head><meta http-equ ...
- bootstrap世界探索1——山川河流(文字排版)
世界到底是什么?其实世界很简单,正所谓一花一世界,一树一菩提,世界就在我们身边.造物神是伟大的,在我看来无论是HTML,css,js都可以看作是一个世界,但是他们是构成宏观世界不可或缺的,正如IU框架 ...
最新文章
- c语言斐波那契数列_斐波那契数列之美
- 单链表的几个基本操作
- Adam公式+参数解析
- NoSql中的B-tree、B+tree和LSM-tree
- vue实现todo功能(一):搭建vue-webpack环境
- 面试中回答离职原因的万能公式
- WCF的追踪分析工具——SvcPerf
- EclipseIDEA使用经验
- MyBatis foreach语句批量插入数据
- Android API介绍
- 【CSS系列】获取实时数据做进度
- 珍藏版《一步一步学PLC编程》全套资料!
- [病毒木马] LSP劫持
- android手机录屏工具,安卓手机上有什么好用的屏幕录屏软件可以推荐?
- 新款大屏卡罗拉linux系统,丰田卡罗拉大屏车载导航影音系统
- Java复习第二弹!
- 服务器硬盘开机吱吱响,开机时硬盘吱吱响的原因
- ECC椭圆曲线加密的特点以及在有限域(Fp)的三点共线问题
- 微信公众号语音内容提取下载
- 英语语法---连接词详解