Flask大标题下设置小标题(再加一个线)【html Css】

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/a19990412/article/details/84968732

简述

参考:
https://getbootstrap.com/docs/4.1/content/typography/
https://blog.csdn.net/think2me/article/details/7419028

在这里插入图片描述

核心代码

		<h1>
            Fancy display heading
            <small class="text-muted">With faded secondary text</small>
        </h1>
        <div style="height:1px; background:#E0E0E0;"></div>

完全代码

  • 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">
        <h3>
            Fancy display heading
            <small class="text-muted">With faded secondary text</small>
        </h3>
        <div style="height:1px; background:#E0E0E0;"></div>
        <h2>
            Fancy display heading
            <small class="text-muted">With faded secondary text</small>
        </h2>
        <div style="height:1px; background:#E0E0E0;"></div>
        <h1>
            Fancy display heading
            <small class="text-muted">With faded secondary text</small>
        </h1>
        <div style="height:1px; background:#E0E0E0;"></div>
    </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>
from flask import Flask, render_template

app = Flask(__name__)


@app.route('/')
def hello_world():
    return render_template('index.html')


if __name__ == '__main__':
    app.run()

效果图就是简述上的。

猜你喜欢

转载自blog.csdn.net/a19990412/article/details/84968732