简述

这是最基本的啦。以后肯定是可以用到的~

核心代码

参考
https://getbootstrap.com/docs/4.1/content/typography/#inline-text-elements

效果:

You can use the mark tag to highlight text.

This line of text is meant to be treated as deleted text.

This line of text is meant to be treated as no longer accurate.

This line of text is meant to be treated as an addition to the document.

This line of text will render as underlined

This line of text is meant to be treated as fine print.

This line rendered as bold text.

This line rendered as italicized text.

<p>You can use the mark tag to <mark>highlight</mark> text.</p>
<p><del>This line of text is meant to be treated as deleted text.</del></p>
<p><s>This line of text is meant to be treated as no longer accurate.</s></p>
<p><ins>This line of text is meant to be treated as an addition to the document.</ins></p>
<p><u>This line of text will render as underlined</u></p>
<p><small>This line of text is meant to be treated as fine print.</small></p>
<p><strong>This line rendered as bold text.</strong></p>
<p><em>This line rendered as italicized text.</em></p>

高亮

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

删除线

  • <del> 或者<s>
     <p><del>This line of text is meant to be treated as deleted text.</del></p><p><s>This line of text is meant to be treated as no longer accurate.</s></p>

下划线

  • <ins><u>
     <p><ins>This line of text is meant to be treated as an addition to the document.</ins></p><p><u>This line of text will render as underlined</u></p>

加粗斜体变小

第一个是正常的效果

This line of text is meant to be treated as original print.

This line of text is meant to be treated as fine print.

This line rendered as bold text.

This line rendered as italicized text.

<p><small>This line of text is meant to be treated as fine print.</small></p>
<p><strong>This line rendered as bold text.</strong></p>
<p><em>This line rendered as italicized text.</em></p>

完整代码

  • templates/index.html
<!doctype html>
<html lang="zh">
<head><!-- Required meta tags --><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><!-- Bootstrap CSS --><link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css"integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous"><title>Hello, world!</title>
</head>
<body>
<div class="row"><div class="col-md-12 col-sm-12 col-xs-12"><p>You can use the mark tag to<mark>highlight</mark>text.</p><p><del>This line of text is meant to be treated as deleted text.</del></p><p><s>This line of text is meant to be treated as no longer accurate.</s></p><p><ins>This line of text is meant to be treated as an addition to the document.</ins></p><p><u>This line of text will render as underlined</u></p><p>This line of text is meant to be treated as original print.</p><p><small>This line of text is meant to be treated as fine print.</small></p><p><strong>This line rendered as bold text.</strong></p><p><em>This line rendered as italicized text.</em></p></div>
</div>
<!-- Optional JavaScript -->
<!-- jQuery first, then Popper.js, then Bootstrap JS -->
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js"integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo"crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js"integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49"crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js"integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy"crossorigin="anonymous"></script>
</body>
</html>
  • app.py
from flask import Flask, render_templateapp = Flask(__name__)@app.route('/')
def hello_world():return render_template('index.html')if __name__ == '__main__':app.run()

flask-bootstrap-高亮-下划线-删除线-加粗-斜体相关推荐

  1. android textView 替文字添加下划线 删除线

    android textView 替文字添加下划线 删除线 方法1: tv=(TextView)findViewById(R.id.tv); tv.getPaint().setFlags(Paint. ...

  2. Latex ulem包设置下划线删除线强调文本等效果

    引言 今天在用IEEE的模板写latex的时候,发现了一个问题:由\begin{algorithm}方法生成的伪代码中原本默认应该是斜体的强调部分,发现最后显示时被自动加了下划线. 我调了十几分钟也没 ...

  3. text-decoration下划线 删除线 上划线属性样式

    text-decoration 下划线CSS单词值参数: none : 无装饰 blink : 闪烁 underline : 下划线 line-through : 贯穿线 overline : 上划线 ...

  4. html文字居中加下划线,HTML文字对齐,斜体,下划线和删除线

    标题的对齐方式: 在默认情况下,标题文字都是靠左对齐的.而在网页的制作过程中,可以实现标题文字的编排设置.最常用的就是关于对齐方式的设置了,可以为标题标签添加"align"属性进行 ...

  5. android字符串加删除线,android textview 添加上划线 中划线 删除线

    很简单:两个例子一样 例如1: android textview 添加下划线 中划线 删除线 tv=(TextView)findViewById(R.id.tvId); tv.getPaint().s ...

  6. printf输出颜色和ANSI控制码(高亮,下划线,闪烁,光标位置,清屏等)

    printf输出颜色和ANSI控制码(高亮,下划线,闪烁,光标位置,清屏等) 帝都码农 2010-05-28 23:52:00 4560 收藏 2 文章标签: function file printf ...

  7. 2019-7-22 [HTML] 基本结构 DOCTYPE声明 标签:[title meta 标题 段落 换行 加粗 斜体 下划线] 注释 特殊字符 img标签 a标签

    文章目录 0.HTML网页技术(基础) 1 HTML概述 1.1 什么是HTML? 1.2 Hello,HTML! 2 HBuilder的安装与使用 2.1 安装HBuilder 2.2 使创建项目 ...

  8. wps怎么把边框加粗_wps怎么把边框线加粗

    1.wps文字处理中的表格边框加粗怎么处理 工具原料:电脑.wps软件 wps文字处理中的表格边框加粗的具体操作步骤: 1.首先,打开一个wps文档. 2.打开之后,选中要加粗的表格,如图点击&quo ...

  9. wps怎么把边框加粗_WPS文字表格怎么把表格外框线加粗?

    当我们要对word中插入的表格边框进行加粗的话,该如何操作呢?这就是本章的主要内容,脚本之家教大家如何去给word表格编辑进行加粗的方法. 一.对word表格整个表格进行边框加粗: 选中表格,右击-& ...

最新文章

  1. Python : IndentationError: expected an indented block
  2. java new arraylist_Java中ArrayList用法详解
  3. 一般服务器崩了要多久能修复,阴阳师服务器崩了修复了吗?阴阳师最新4月15日更新内容...
  4. leetcode 509. 斐波那契数(dfs)
  5. python怎么放音乐_python怎么播放音乐
  6. C/C++基础语法,赶紧收藏好哟~
  7. python 统计分析 包_Python 数据分析包:pandas 基础
  8. width:100%与绝对定位同时存在,偏移出父级容器
  9. 【论文写作】课程指导平台的开发中界面设计如何写
  10. Gradle编译spring3.x报错找不到itextpdf4.2.2解决方案
  11. 《JavaScript高效图形编程(修订版)》——导读
  12. 小小精彩的flash
  13. 中国石油大学《思想道德修养与法律基础》第三阶段在线作业
  14. 信息安全-大数据安全需求分析与安全保护工程
  15. 计算机英语合成词大全,常用的英语合成词大全
  16. 演绎另类黑客马拉松,机智云中国第二届智能硬件36小时开发大赛完美收官
  17. JavaFX七巧板游戏:布局控件
  18. Win11 更新完检测不到音频设备
  19. 三洋服务器Q系列报警代码,三洋伺服故障报警维修
  20. 被西南财经大学辞退的前院长,获得了今年的诺贝尔经济学奖

热门文章

  1. leetcode旋转数组 c语言,leetcode explore 初级算法第三题,旋转数组代码实现
  2. 利用 Android Studio 和 Gradle 打包多版本APK
  3. MyBatis中的selectKey
  4. yocto中文环境搭建
  5. Redis常用命令集
  6. grep,egrep及元字符和posix字符集
  7. 实时计字数提醒的文本框
  8. 【数据平台】Pytorch库初识
  9. 算法导论之图的最小生成树
  10. Leetcode 114. 二叉树展开为链表 解题思路及C++实现