- Bootstrap 4 教程
- Bootstrap 4 - 主頁
- Bootstrap 4 - 概述
- Bootstrap 4 - 環境設定
- Bootstrap 4 - 佈局
- Bootstrap 4 - 網格系統
- Bootstrap 4 - 內容
- Bootstrap 4 - 元件
- Bootstrap 4 - 實用工具
- Bootstrap 3 和 4 之間的差異
- Bootstrap 4 - 有用資源
- Bootstrap 4 - 快速教程
- Bootstrap 4 - 有用資源
- Bootstrap 4 - 討論
Bootstrap 4 - 巨型文字
描述
巨型文字元件增加了標題大小,為登入頁面內容添加了大量邊距。預設情況下,巨型文字元件以淺灰色框的形式顯示,以顯示重要資訊。
基本巨型文字
向 <div> 元素新增 .jumbotron 類,建立巨型文字,如下面的示例所示 −
示例
<html lang = "en">
<head>
<!-- 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>Bootstrap 4 Example</title>
</head>
<body>
<div class = "container">
<h2>Jumbotron</h2>
<div class = "jumbotron">
<h2>Welcome To Tutorials Point!</h2>
<p class = "lead">
Our mission is to deliver Simply Easy Learning with clear, crisp, and
to-the-point content on a wide range of technical and non-technical
subjects without any preconditions and impediments.
</p>
<hr class = "my-4">
<p>20 million readers read 50 million pages every month.</p>
<a class = "btn btn-info btn-sm" href = "#" role = "button">Read more</a>
</div>
</div>
<!-- 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>
它將產生以下結果 −
輸出
流體巨型文字
使用 .jumbotron-fluid 類建立沒有圓角的全寬巨型文字,並在巨型文字中新增 .container 或 .container-fluid 類,如下面的示例所示 −
示例
<html lang = "en">
<head>
<!-- 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>Bootstrap 4 Example</title>
</head>
<body>
<div class = "jumbotron jumbotron-fluid">
<div class = "container">
<h2>Fluid jumbotron</h2>
<p class = "lead">This occupies the entire horizontal space.</p>
</div>
</div>
<!-- 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>
它將產生以下結果 −
輸出
bootstrap4_components.htm
廣告