English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
Jumbotron(超巨大画面)は大きな灰色の背景ボックスを作成し、特別な内容や情報を設定できます。
ヒント: Jumbotron 内には HTML タグや Bootstrap の要素を入れることができます。
div 要素に .jumbotron クラスを追加することで jumbotron を作成できます:
<!DOCTYPE html> <html> <head> <title>Bootstrap 示例</title> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="https://cdn.staticfile.org/twitter-bootstrap/4.3.1/css/bootstrap.min.css"> <script src="https://cdn.staticfile.org/jquery/3.2.1/jquery.min.js"></script> <script src="https://cdn.staticfile.org/popper.js/1.15.0/umd/popper.min.js"></script> <script src="https://cdn.staticfile.org/twitter-bootstrap/4.3.1/js/bootstrap.min.js"></script> </head> <body> <div class="container"> <div class="jumbotron"> <h1>基本教程(oldtoolbag.com)</h1> <p>基礎を学ぶことができれば、もっと遠くへ行ける!!!</p> </div> <p>これはテキストです。</p> <p>これはテキストです。</p> </div> </body> </html>テストをしてみる‹/›
全画面に丸みを帯びない Jumbotron を作成したい場合は、.jumbotron-.container クラス内の div に .container や .container-fluid クラスを使用して:
<!DOCTYPE html> <html> <head> <title>Bootstrap 示例</title> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="https://cdn.staticfile.org/twitter-bootstrap/4.3.1/css/bootstrap.min.css"> <script src="https://cdn.staticfile.org/jquery/3.2.1/jquery.min.js"></script> <script src="https://cdn.staticfile.org/popper.js/1.15.0/umd/popper.min.js"></script> <script src="https://cdn.staticfile.org/twitter-bootstrap/4.3.1/js/bootstrap.min.js"></script> </head> <body> <div class="jumbotron jumbotron-fluid"> <div class="container"> <h1>基本教程(oldtoolbag.com)</h1> <p>基礎を学ぶことができれば、もっと遠くへ行ける!!!</p> </div> </div> <div class="container"> <p>これはテキストです。</p> <p>これはテキストです。</p> </div> </body> </html>テストをしてみる‹/›