「Bootstrap5」レイアウト.container-fluidコンテナのサンプル

環境
Bootstrap 5.1.3
書式
class="container-fluid"
.container-fluid は画面の横幅いっぱいまでスムーズに広がるコンテナを生成します。
すべてのブレークポイントで width: 100% となります。

使用例

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
<!DOCTYPE html>
<html>
<head>
<title>Bootstrapサンプル</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet">
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js"></script>
</head>
<body>
<div class="container-fluid">
<h1>最初 Bootstrap ページ画面</h1>
<p>この部分は .container-fluid クラス内にあります.</p>
<p>.container-fluid クラスは、ビューポートの幅全体にわたる全幅のコンテナーを提供します。</p>
</div>
</body>
</html>
<!DOCTYPE html> <html> <head> <title>Bootstrapサンプル</title> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet"> <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js"></script> </head> <body> <div class="container-fluid"> <h1>最初 Bootstrap ページ画面</h1> <p>この部分は .container-fluid クラス内にあります.</p> <p>.container-fluid クラスは、ビューポートの幅全体にわたる全幅のコンテナーを提供します。</p> </div> </body> </html>
<!DOCTYPE html>
<html>
<head>
  <title>Bootstrapサンプル</title>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet">
  <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js"></script>
</head>
<body>
  
<div class="container-fluid">
  <h1>最初 Bootstrap ページ画面</h1>
  <p>この部分は .container-fluid クラス内にあります.</p>
  <p>.container-fluid クラスは、ビューポートの幅全体にわたる全幅のコンテナーを提供します。</p>     
</div>

</body>
</html>

 

Bootstrap5

Posted by arkgame