Bootstrap 4 – Jumbotron

Trong bootstrap, Jumbotron là 1 đoạn trích dẫn, câu nói có định dạng nổi bật. Mặc định, background#eceeef.

Để tạo jumbotron, sử dụng class .jumbotron trong element div.

<!DOCTYPE html>
<html lang="en">

<head>
  <title>Bootstrap Example</title>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.1.0/css/bootstrap.min.css">
  <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
  <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.0/umd/popper.min.js"></script>
  <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.1.0/js/bootstrap.min.js"></script>
</head>

<body>

  <div class="container">

    <div class="jumbotron">
      <h1>My Jumbotron</h1>
      <p>Think BIG with a Bootstrap Jumbotron!</p>
    </div>

  </div>

</body>

</html>

Full-Width Jumbotron

Để tạo Jumbotron full chiều rộng và không bo tròn, sử dụng class .jumbotron-fluid cùng với jumbotron.

<!DOCTYPE html>
<html lang="en">

<head>
  <title>Bootstrap Example</title>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.1.0/css/bootstrap.min.css">
  <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
  <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.0/umd/popper.min.js"></script>
  <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.1.0/js/bootstrap.min.js"></script>
</head>

<body>

  <div class="jumbotron jumbotron-fluid">
    <div class="container">
      <h1>My Jumbotron</h1>
      <p>Think BIG with a Bootstrap Jumbotron!</p>
    </div>
  </div>

</body>

</html>